mirror of
https://git.myvelabs.com/novnc/alpine.git
synced 2025-12-18 00:06:21 +00:00
Update novnc/Dockerfile
This commit is contained in:
parent
a7a3e82b10
commit
41971320aa
1 changed files with 8 additions and 8 deletions
|
|
@ -8,29 +8,29 @@ RUN apk add --no-cache \
|
||||||
&& <<-'01-init' cat >>/app/init.d/01-init.sh
|
&& <<-'01-init' cat >>/app/init.d/01-init.sh
|
||||||
|
|
||||||
# Check for client variables
|
# Check for client variables
|
||||||
if ! [ ${MYVNC_VNCCLIENT_HOST} ]
|
if ! [ ${MYVNC_VNCSSH_HOST} ]
|
||||||
then
|
then
|
||||||
echo "Variable MYVNC_VNCCLIENT_HOST is missing."
|
echo "Variable MYVNC_VNCSSH_HOST is missing."
|
||||||
echo "Exiting..."
|
echo "Exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if ! [ ${MYVNC_VNCCLIENT_PORT} ]
|
if ! [ ${MYVNC_VNCSSH_PORT} ]
|
||||||
then
|
then
|
||||||
echo "Variable MYVNC_VNCCLIENT_PORT is missing."
|
echo "Variable MYVNC_VNCSSH_PORT is missing."
|
||||||
echo "Exiting..."
|
echo "Exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if ! [[ ${MYVNC_VNCCLIENT_PORT} =~ ^[0-9]+$ ]]
|
if ! [[ ${MYVNC_VNCSSH_PORT} =~ ^[0-9]+$ ]]
|
||||||
then
|
then
|
||||||
echo "Variable MYVNC_VNCCLIENT_PORT is invalid."
|
echo "Variable MYVNC_VNCSSH_PORT is invalid."
|
||||||
echo "Exiting..."
|
echo "Exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Read ssh client variables hostname and port (5900, 5901, 5902, etc)
|
# Read ssh client variables hostname and port (5900, 5901, 5902, etc)
|
||||||
if ssh ${MYVNC_VNCCLIENT_HOST} exit
|
if ssh ${MYVNC_VNCSSH_HOST} exit
|
||||||
then
|
then
|
||||||
ssh ${MYVNC_VNCCLIENT_HOST} -L ${MYVNC_VNCLISTEN_HOST:-5900}:localhost:${MYVNC_VNCCLIENT_PORT} &
|
ssh ${MYVNC_VNCSSH_HOST} -L ${MYVNC_VNCLISTEN_HOST:-5900}:localhost:${MYVNC_VNCSSH_PORT} &
|
||||||
else
|
else
|
||||||
echo "Unable to establish SSH tunnel."
|
echo "Unable to establish SSH tunnel."
|
||||||
echo "Exiting..."
|
echo "Exiting..."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue