Use upstream tigervnc

This commit is contained in:
Simon Li 2019-09-30 12:18:35 +01:00
parent 3b0f9663bf
commit ae6a7a7b65
No known key found for this signature in database
GPG Key ID: F604A75EB0CBF584
2 changed files with 13 additions and 4 deletions

View File

@ -1,19 +1,24 @@
FROM jupyter/base-notebook FROM jupyter/base-notebook
USER root USER root
# Useful tools for debugging connection problems
RUN apt-get update -y -q && \ RUN apt-get update -y -q && \
apt-get install -y -q \ apt-get install -y -q \
curl \ curl \
patch \ net-tools \
tigervnc-standalone-server \
vim vim
# Desktop environment, keep in sync with jupyter_notebook_config.py # Desktop environment, keep in sync with jupyter_notebook_config.py
# ENV DESKTOP_PACKAGE lxde # ENV DESKTOP_PACKAGE lxde
ENV DESKTOP_PACKAGE xfce4 ENV DESKTOP_PACKAGE xfce4
RUN apt-get install -y -q ${DESKTOP_PACKAGE} RUN apt-get install -y -q \
xterm \
${DESKTOP_PACKAGE}
# Novnc: just want web files, we'll install our own newer websockify # Don't install distro versions of tigervnc and websockify, instead install
# upstream versions
# Novnc: just want web files
RUN cd /opt && \ RUN cd /opt && \
curl -sSfL https://github.com/novnc/noVNC/archive/v1.1.0.tar.gz | tar -zxf - curl -sSfL https://github.com/novnc/noVNC/archive/v1.1.0.tar.gz | tar -zxf -
@ -27,6 +32,9 @@ RUN sed -i.bak \
-re "s%rfb.scaleViewport = .+%rfb.resizeSession = readQueryVariable('resize', true);%" \ -re "s%rfb.scaleViewport = .+%rfb.resizeSession = readQueryVariable('resize', true);%" \
/opt/noVNC-1.1.0/vnc_lite.html /opt/noVNC-1.1.0/vnc_lite.html
# Install tigervnc to /usr/local
RUN curl -sSfL 'https://bintray.com/tigervnc/stable/download_file?file_path=tigervnc-1.9.0.x86_64.tar.gz' | tar -zxf - -C /usr/local --strip=2
USER jovyan USER jovyan
# Custom jupyter-server-proxy to load vnc_lite.html instead of / # Custom jupyter-server-proxy to load vnc_lite.html instead of /

View File

@ -13,6 +13,7 @@ c.ServerProxy.servers = {
'/opt/conda/bin/websockify', '/opt/conda/bin/websockify',
'-v', '-v',
'--web', '/opt/noVNC-1.1.0', '--web', '/opt/noVNC-1.1.0',
'--heartbeat', '30',
'5901', '5901',
'--', '--',
'vncserver', 'vncserver',