mirror of
https://git.myvelabs.com/novnc/alpine.git
synced 2025-12-17 21:36: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
|
||||
|
||||
# Check for client variables
|
||||
if ! [ ${MYVNC_VNCCLIENT_HOST} ]
|
||||
if ! [ ${MYVNC_VNCSSH_HOST} ]
|
||||
then
|
||||
echo "Variable MYVNC_VNCCLIENT_HOST is missing."
|
||||
echo "Variable MYVNC_VNCSSH_HOST is missing."
|
||||
echo "Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
if ! [ ${MYVNC_VNCCLIENT_PORT} ]
|
||||
if ! [ ${MYVNC_VNCSSH_PORT} ]
|
||||
then
|
||||
echo "Variable MYVNC_VNCCLIENT_PORT is missing."
|
||||
echo "Variable MYVNC_VNCSSH_PORT is missing."
|
||||
echo "Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
if ! [[ ${MYVNC_VNCCLIENT_PORT} =~ ^[0-9]+$ ]]
|
||||
if ! [[ ${MYVNC_VNCSSH_PORT} =~ ^[0-9]+$ ]]
|
||||
then
|
||||
echo "Variable MYVNC_VNCCLIENT_PORT is invalid."
|
||||
echo "Variable MYVNC_VNCSSH_PORT is invalid."
|
||||
echo "Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Read ssh client variables hostname and port (5900, 5901, 5902, etc)
|
||||
if ssh ${MYVNC_VNCCLIENT_HOST} exit
|
||||
if ssh ${MYVNC_VNCSSH_HOST} exit
|
||||
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
|
||||
echo "Unable to establish SSH tunnel."
|
||||
echo "Exiting..."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue