docker-qgis-desktop
A docker project that will run your QGIS desktop app inside a docker container
docker-qgis-desktop: QGIS in a container, now deprecated
A Docker project that runs the QGIS desktop application inside a container. The README marks it deprecated, names a replacement, and documents the limitations of the old approach.
Deprecated at the top
The README opens with a deprecation notice and a link to the replacement project. It also admits the current approach is experimental and probably not the most optimal way to run QGIS in a container. So anyone landing here gets the verdict before the how-to.
The known rough edges
Two limitations are called out. The Qt4 theme does not carry over nicely, and the setup uses xhost plus, which lets any remote host display windows on your X display, a concern the README shrugs off as probably fine on a local network. It also mentions an alternative: running the script at the docker user to avoid xhost plus. On a macOS host, you would need an X11 server like XQuartz and SOCAT for tunneling.
The compose example
A docker compose example shows how to run QGIS Desktop from a container, with a note that xhost plus may need to run first. QGIS should then appear on the local display. The example database is stateless, so it disappears when the compose command removes the containers, and connection details are given for reaching it from Docker.
Two ways to build
The docker repository approach consumes the most bandwidth for the initial build but updates easily afterward, and you create the desktop shortcut yourself from repo resources. Building the image yourself means cloning the repo and running build.sh, which generates a launcher script in /usr/local/bin and a desktop shortcut. To run a container, the README points at the compose path or direct commands, notes that your home directory is mounted into the container, and warns that a crashed QGIS can leave an orphan docker process behind.
Community notes