feat: use tigervnc binaries to support 16.04
This commit is contained in:
parent
808fc464a5
commit
1476f5c155
2 changed files with 12 additions and 7 deletions
|
@ -5,6 +5,7 @@ LABEL MAINTAINER="DCsunset"
|
||||||
|
|
||||||
ENV noVNC_version=1.1.0
|
ENV noVNC_version=1.1.0
|
||||||
ENV websockify_version=0.9.0
|
ENV websockify_version=0.9.0
|
||||||
|
ENV tigervnc_version=1.10.1
|
||||||
|
|
||||||
# Local debug
|
# Local debug
|
||||||
#COPY ./sources.list /etc/apt/
|
#COPY ./sources.list /etc/apt/
|
||||||
|
@ -14,13 +15,15 @@ ENV websockify_version=0.9.0
|
||||||
# Install apps
|
# Install apps
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq xfce4 xfce4-goodies \
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq xfce4 xfce4-goodies \
|
||||||
tigervnc-standalone-server \
|
|
||||||
chromium-browser vim wget \
|
chromium-browser vim wget \
|
||||||
python3-numpy python3-setuptools \
|
python3-numpy python3-setuptools \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install noVNC
|
# Install TigerVNC and noVNC
|
||||||
RUN wget https://github.com/novnc/websockify/archive/v${websockify_version}.tar.gz -O /websockify.tar.gz \
|
RUN wget "https://bintray.com/tigervnc/stable/download_file?file_path=tigervnc-${tigervnc_version}.x86_64.tar.gz" -O /tigervnc.tar.gz \
|
||||||
|
&& tar -xvf /tigervnc.tar.gz -C / \
|
||||||
|
&& rm /tigervnc.tar.gz \
|
||||||
|
&& wget https://github.com/novnc/websockify/archive/v${websockify_version}.tar.gz -O /websockify.tar.gz \
|
||||||
&& tar -xvf /websockify.tar.gz -C / \
|
&& tar -xvf /websockify.tar.gz -C / \
|
||||||
&& cd /websockify-${websockify_version} \
|
&& cd /websockify-${websockify_version} \
|
||||||
&& python3 setup.py install \
|
&& python3 setup.py install \
|
||||||
|
|
10
start.sh
10
start.sh
|
@ -4,13 +4,15 @@ umask 0077 # use safe default permissions
|
||||||
mkdir -p "$HOME/.vnc" # create config directory
|
mkdir -p "$HOME/.vnc" # create config directory
|
||||||
chmod go-rwx "$HOME/.vnc" # enforce safe permissions
|
chmod go-rwx "$HOME/.vnc" # enforce safe permissions
|
||||||
|
|
||||||
|
tigervnc_path="/tigervnc-${tigervnc_version}.x86_64/usr/bin"
|
||||||
|
|
||||||
# Start TigerVNC
|
# Start TigerVNC
|
||||||
if [ ! -z $VNC_PASSWD ]; then
|
if [ ! -z $VNC_PASSWD ]; then
|
||||||
vncpasswd -f <<< "$VNC_PASSWD" > "$HOME/.vnc/passwd"
|
${tigervnc_path}/vncpasswd -f <<< "$VNC_PASSWD" > "$HOME/.vnc/passwd"
|
||||||
vncserver -localhost no :0
|
${tigervnc_path}/vncserver -localhost no :0
|
||||||
else
|
else
|
||||||
vncpasswd -f <<< "" > "$HOME/.vnc/passwd"
|
${tigervnc_path}/vncpasswd -f <<< "" > "$HOME/.vnc/passwd"
|
||||||
vncserver --I-KNOW-THIS-IS-INSECURE -SecurityTypes None -localhost no :0
|
${tigervnc_path}/vncserver --I-KNOW-THIS-IS-INSECURE -SecurityTypes None -localhost no :0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start noVNC
|
# Start noVNC
|
||||||
|
|
Reference in a new issue