Skip to content

Commit c7b0dc1

Browse files
allow to override VNC port (#1296)
* allow to override VNC port fixes #457 * Update README.md Co-authored-by: Diego Molina <[email protected]>
1 parent c2f7e38 commit c7b0dc1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

NodeBase/start-vnc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if [ "${START_XVFB}" = true ] ; then
3131
echo "Waiting for Xvfb..."
3232
done
3333

34-
x11vnc ${X11VNC_OPTS} -forever -shared -rfbport 5900 -rfbportv6 5900 -display ${DISPLAY}
34+
x11vnc ${X11VNC_OPTS} -forever -shared -rfbport ${VNC_PORT:-5900} -rfbportv6 ${VNC_PORT:-5900} -display ${DISPLAY}
3535
else
3636
echo "Vnc won't start because Xvfb is configured to not start."
3737
fi

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,8 @@ inside the container. Users can connect to this server in two ways:
576576
The VNC server is listening to port 5900, you can use a VNC client and connect to it. Feel free to map port 5900 to
577577
any free external port that you wish.
578578

579-
The internal 5900 port remains the same because that is the configured port for the VNC server running inside the container.
579+
The internal 5900 port remains the same because that is the configured port for the VNC server running inside the container.
580+
You can override it with the `VNC_PORT` environment variable in case you want to use `--net=host`.
580581

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

0 commit comments

Comments
 (0)