forked from 3liz/docker-qgis-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqgis-run
executable file
·28 lines (22 loc) · 869 Bytes
/
qgis-run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
FLAVOR=${QGIS_FLAVOR:-release}
# see https://github.com/moby/moby/issues/38442
# see https://stackoverflow.com/questions/52501594/qt-app-ui-elements-randomly-rendered-as-blank-black-in-docker
# Add the following options for using posgres configuration
# -v /var/run/postgresql/:/var/run/postgresql \
# -e PGSERVICEFILE=/home/$USER/.pg_service.conf \
# -e PGPASSFILE=/home/$USER/.pgpass \
PG_RUN=/var/run/postgresql
docker run --rm --name qgis-$FLAVOR --net host \
-u $(id -u):$(id -g) \
-e DISPLAY=unix$DISPLAY \
-e USER=$USER \
-e HOME=/home/$USER \
-e QT_X11_NO_MITSHM=1 \
-e QT_DEBUG_PLUGINS=1 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $HOME:/home/$USER \
-v $PG_RUN:/var/run/postgresql \
-e PGSERVICEFILE=/home/$USER/.pg_service.conf \
-e PGPASSFILE=/home/$USER/.pgpass \
qgis:$FLAVOR qgis $@