WHY: I frequently have to transfer geospatial projects between work and personal Macs & then get caught catching systems up from recent changes. I really wanted to use github/docker-qgis-desktop (from DockerHub), but felt referencing my system user was sketchy & found it just as problematic when porting.
STEPS: We're going to combine github/docker-ubuntu-vnc-desktop with qgis.org/download/ubuntu#steps
-
Create Dockerfile
FROM dorowu/ubuntu-desktop-lxde-vnc:focal ENV USER=dinos ENV HTTP_PASSWORD=go_rawr RUN apt-get update --fix-missing RUN sudo apt-get install -y qgis qgis-plugin-grass RUN rm -rf /var/lib/apt/lists/* RUN rm -r /root/.cache
-
Build (from Dockerfile's directory)
docker build . --tag qgis_on_ubuntu_emulator < Dockerfile
WIP Note: Still figuring out how to reduce the bloat, but majority is base image
$ docker image list REPOSITORY TAG IMAGE ID CREATED SIZE qgis_on_ubuntu_emulator latest 61d5b81fbfe9 10 minutes ago 2.3GB ubuntu_emulator latest 0cc9e3efcc5d 5 months ago 1.32GB
-
Run (choosing localhost port
12345
because it's tickles my giggles today - aka all the fun port math numbers are busy)$ docker run -p 12345:80 qgis_on_ubuntu_emulator
NOTE: example does not include volume/data/package persistence which is desirable, but left as an excercise to the reader
-
Open browser at
http://localhost:12345/
-
Once Ubuntu machine starts up, will ask you to HTTP authenticate; use
username:password
pair ofdinos:go_rawr
(set above) -
In Ubuntu, navigate: Start menu > Education > "QGIS Desktop" (or "GRASS GIS 7")
-
Once it opens, you're ready to click through QGIS updates & then start up a new project 🎉
SCREENSHOT