Docker Community Forums

Share and learn in the Docker community.

Docker and GUI Desktop


I am looking into on how to run QGIS-desktop in Docker.

  • I am running on Ubuntu 19.
  • Docker version 19.03.12, build 48a66213fe
  • docker-compose version 1.23.2, build 1110ad01

Here is the repo by Kartoza (
And here is the example from the page:

  image: kartoza/postgis:9.4-2.1
    - USERNAME=docker
    - PASS=docker
  image: kartoza/qgis-desktop:2.14
  hostname: qgis-server
    # Wherever you want to mount your data from
    - ./gis:/gis
    # Unix socket for X11
    - /tmp/.X11-unix:/tmp/.X11-unix
    - db:db
    - DISPLAY=unix:1
  command: /usr/bin/qgis

So I am failing on the DISPLAY=unix:1 environment variable
and the error is like this:
qgisdesktop_1 | Warning: qgis: cannot connect to X server unix:1

Is my problem to be found there or is it something else ?

best, i


Some more information.
I found the following code on docker-hub as a docker run-command (

xhost +
# Users home is mounted as home
# --rm will remove the container as soon as it ends

docker run --rm --name="qgis-desktop-2.10" \
    -i -t \
    -v ${HOME}:/home/${USER} \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e DISPLAY=unix$DISPLAY \
xhost -

Would that be hard to package that in a docker-compose.yml-file ? and link it to the postgis-database ? is the magic here the xhost - ?

The repo ( has not been updated since 2018 - so I guess that would be hard to upgrade it to the latest qgis-versions or there are other difficulties in maintaining this project … what would be your guess ?
I have seen another project where rStudio is started up in a docker-container and accessible from a browser - would that even be preferable when it comes to the qgis-desktop ?
Any advice on how to move forward is appreaciated.

The Docker Desktop Dashboard provides a simple interface that enables you to interact with containers and applications, and manage the lifecycle of your applications directly from your machine. The Dashboard UI shows all running, stopped, and started containers with their status. It provides an intuitive interface to perform common actions to inspect, interact with, and manage your Docker objects including containers and Docker Compose-based applications.

The Docker Desktop Dashboard offers the following benefits:

A GUI to abstract core information from the CLI
Access to container logs directly in the UI to search and explore container behavior
Access to combined Compose logs from the UI to understand Compose applications
Quick visibility into ports being used by containers
Monitor container resource utilization
In addition, the Dashboard UI allows you to:

Navigate to the Preferences (Settings in Windows) menu to configure Docker Desktop preferences
Access the Troubleshoot menu to debug and perform restart operations
Sign into Docker Hub using your Docker ID
To access the Docker Desktop Dashboard, from the Docker menu, select Dashboard. The Dashboard provides a runtime view of all your containers and applications.

Hi @lewish95 ,
never heard om the ‘Docker Desktop Dashboard’, is that a new product ?

  • could you provide some links here, is it free of cost (community version) and am I able to package standalone-apps like the Qgis-desktop ? Netbeans, rStudio and such and access it ?
    So, how would I go about running qgis-desktop the latest version using the Docker Desktop Dashboard ?

best, i

The Dashboard is a feature of Docker Desktop

On the taskbar (in Windows), find the Docker Desktop icon and left click it. The popup menu will show one of the commands being “Dashboard”. It will open to a window doing what was explained.

See this page for more.

Thank you smhbizness.
But does this answer my initial question about running qgis-desktop in a docker-container ?
How would you go about running the latest qgis-desktop in Docker desktop ?