This will create a docker container with just KMyMoney installed.
- As of 06/25/2025
- ubuntu:latest => 24.04.2 LTS
- kmymoney => 5.1.3-1build15
- Create a Dockerfile: Start by creating a Dockerfile that uses an ubuntu base image.
- Install Required Packages: You will need to install KMyMoney along with its dependencies. This typically includes Qt libraries and other KDE components.
git clone https://github.com/emo3/kmmd.gitcd kmmd- Build the Docker Image: Use the Dockerfile to build your image.
# Pull the latest Ubuntu image
docker pull ubuntu:latest
# Build the container
docker build -t kmymoney-ubuntu .- Set DISPLAY Variable: Run the following command to set the DISPLAY environment variable
export DISPLAY=:0 - Run the Container: Once the image is built, you can run a container from it.
- Access Control: When you run the Docker container,
you may need to allow access for the container to connect to XQuartz.
xhost + 127.0.0.1 - Where you store your data WILL be different that mine. Please remember to replace {YourGDriveEmailHere} with your email connected to Google Drive. If you another cloud storage, then suggest changes that you have verified.
The -v options allow you to bind local directories on your MacOS with the Docker container.
For example, to mount your Google Drive and your KMyMoney data directory:
Note:
- Adjust the paths (
${HOME}/repos/Banks/kmymoney...) to match your system. - I have Google Drive backup this directory.
- If you use another cloud storage, replace the path accordingly.
# Run the container
docker run -it --rm --name kmymoney -d \
-e DISPLAY=host.docker.internal:0 \
-e QT_QPA_PLATFORM=xcb \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v ${HOME}/repos/Banks/kmymoney:/root/mydata \
-v ${HOME}/repos/Banks/kmymoney/.config/kmymoney:/root/.config/kmymoney \
kmymoney-ubuntu
# Shell into container
docker exec -it kmymoney /bin/bashSince KMyMoney is a GUI application, you need an X11 server to display the interface on MacOS.
Install XQuartz and start it before running the container.
You may also need to allow network connections to the X server:
xhost +The following environment variables are used in the Dockerfile:
TZ: Sets the timezone (default:America/New_York)DEBIAN_FRONTEND: Set tononinteractivefor automated installs
You can override these when running the container:
docker run -e TZ=Europe/Berlin ...