Skip to content

Commit ed0ebe9

Browse files
Added configurable env variables to support disabling noVnc and changing the ports (#1385)
1 parent 8e2e26e commit ed0ebe9

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

NodeBase/Dockerfile.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ ENV SCREEN_DPI 96
160160
ENV DISPLAY :99.0
161161
ENV DISPLAY_NUM 99
162162
ENV START_XVFB true
163+
ENV START_NO_VNC true
163164

164165
#========================
165166
# Selenium Configuration

NodeBase/start-novnc.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
# IMPORTANT: Change this file only in directory NodeBase!
44

55
if [ "${START_XVFB}" = true ] ; then
6-
/opt/bin/noVNC/utils/launch.sh --listen 7900 --vnc localhost:5900
6+
if [ "${START_NO_VNC}" = true ] ; then
7+
/opt/bin/noVNC/utils/launch.sh --listen ${NO_VNC_PORT:-7900} --vnc localhost:${VNC_PORT:-5900}
8+
else
9+
echo "noVNC won't start because START_NO_VNC is false."
10+
fi
711
else
812
echo "noVNC won't start because Xvfb is configured to not start."
913
fi

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,7 @@ their browser. This might come handy if you cannot install a VNC client on your
625625
noVNC, so you will need to connect to that port with your browser.
626626

627627
Similarly to the previous section, feel free to map port 7900 to any free external port that you wish.
628+
You can also override it with the `NO_VNC_PORT` environment variable in case you want to use `--net=host`.
628629

629630
Here is an example with the standalone images, the same concept applies to the node images.
630631
``` bash

0 commit comments

Comments
 (0)