2019-09-25 23:21:11 +02:00
|
|
|
FROM jupyter/base-notebook
|
|
|
|
|
|
|
|
USER root
|
|
|
|
RUN apt-get update -y -q && \
|
|
|
|
apt-get install -y -q \
|
|
|
|
curl \
|
2019-09-27 20:30:44 +02:00
|
|
|
patch \
|
|
|
|
tigervnc-standalone-server \
|
|
|
|
vim
|
2019-09-25 23:21:11 +02:00
|
|
|
|
2019-09-29 10:38:14 +02:00
|
|
|
# Desktop environment
|
|
|
|
# ENV DESKTOP_PACKAGE lxde
|
|
|
|
ENV DESKTOP_PACKAGE xfce4
|
|
|
|
RUN apt-get install -y -q ${DESKTOP_PACKAGE}
|
2019-09-29 10:36:52 +02:00
|
|
|
|
|
|
|
# Novnc: just want web files, we'll install our own newer websockify
|
|
|
|
RUN apt-get download -q novnc && \
|
|
|
|
dpkg --force-all -i novnc*.deb && \
|
|
|
|
rm novnc*.deb
|
2019-09-26 19:58:53 +02:00
|
|
|
# Patch novnc to automatically connect
|
2019-09-27 20:30:44 +02:00
|
|
|
# Download missing fonts
|
2019-09-26 19:55:21 +02:00
|
|
|
ADD websocket-path-ui-js.patch /usr/share/novnc/include
|
|
|
|
RUN cd /usr/share/novnc/include/ && \
|
2019-09-27 20:30:44 +02:00
|
|
|
patch -p0 < websocket-path-ui-js.patch && \
|
|
|
|
curl -sSfLO https://raw.githubusercontent.com/novnc/noVNC/v1.1.0/app/styles/Orbitron700.ttf && \
|
|
|
|
curl -sSfLO https://raw.githubusercontent.com/novnc/noVNC/v1.1.0/app/styles/Orbitron700.woff
|
|
|
|
|
2019-09-26 19:55:21 +02:00
|
|
|
USER jovyan
|
2019-09-26 19:58:53 +02:00
|
|
|
# Custom jupyter-server-proxy to load vnc.html instead of /
|
2019-09-26 19:55:21 +02:00
|
|
|
RUN /opt/conda/bin/pip install https://github.com/manics/jupyter-server-proxy/archive/indexpage.zip
|
2019-09-27 20:30:44 +02:00
|
|
|
RUN conda install -y -q -c manics/label/testing websockify
|
|
|
|
ADD jupyter_notebook_config.py /home/jovyan/.jupyter/jupyter_notebook_config.py
|
2019-09-26 19:55:21 +02:00
|
|
|
|
2019-09-27 20:31:15 +02:00
|
|
|
# There may be a discrepency between the interface vncserver listens on
|
|
|
|
# (127.0.0.1) and the interface jupyter-server-proxy connects to (localhost)
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=895582
|
|
|
|
RUN sed -i.bak s/localhost/127.0.0.1/g /opt/conda/lib/python3.7/site-packages/jupyter_server_proxy/handlers.py
|
2019-09-26 19:55:21 +02:00
|
|
|
|
2019-09-29 10:38:14 +02:00
|
|
|
WORKDIR ${HOME}
|
|
|
|
|
2019-09-26 19:55:21 +02:00
|
|
|
# Both these should work:
|
2019-09-29 10:38:14 +02:00
|
|
|
# http://127.0.0.1:8888/desktop
|
2019-09-26 19:58:53 +02:00
|
|
|
# http://localhost:5901/vnc.html
|