db:
image: kartoza/postgis:9.4-2.1
environment:
- USERNAME=docker
- PASS=docker
qgisdesktop:
image: kartoza/qgis-desktop:2.14
hostname: qgis-server
volumes:
# Wherever you want to mount your data from
- ./gis:/gis
# Unix socket for X11
- /tmp/.X11-unix:/tmp/.X11-unix
links:
- db:db
environment:
- 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 ?
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 \
kartoza/qgis-desktop:latest
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 (https://github.com/kartoza/docker-qgis-desktop) 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.
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.
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 ?