We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a05c1e commit 0d4b152Copy full SHA for 0d4b152
tools/testenv
@@ -4,7 +4,15 @@ DEVHOME=${DEVHOME:-~/pdengine-developer-home/}
4
DEV_UID=$(id -u)
5
DEV_GID=$(id -g)
6
PDENGINE_IMAGE=${PDENGINE_IMAGE:-edemo/pdengine}
7
-docker run --rm -p 5900:5900 -e PULL_REQUEST=false -e DEVUID=${DEV_UID} -e DEVGID=${DEV_GID} -e ORG_NAME=local \
+VNCPORT=5900
8
+PORTMAP="-p $VNCPORT:$VNCPORT"
9
+if docker ps | grep -q ":$VNCPORT-"
10
+then
11
+ # port already taken by other container
12
+ PORTMAP=""
13
+fi
14
+
15
+docker run --rm $PORTMAP -e PULL_REQUEST=false -e DEVUID=${DEV_UID} -e DEVGID=${DEV_GID} -e ORG_NAME=local \
16
-v $(pwd):/pdengine -v ${DEVHOME}:/home/developer -v /tmp/.X11-unix:/tmp/.X11-unix \
17
-w /pdengine -it ${PDENGINE_IMAGE}
18
0 commit comments