jupyter-desktop-server/Dockerfile

44 lines
1.6 KiB
Docker
Raw Normal View History

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 \
patch \
tigervnc-standalone-server \
vim
2019-09-25 23:21:11 +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
# Download missing fonts
ADD websocket-path-ui-js.patch /usr/share/novnc/include
RUN cd /usr/share/novnc/include/ && \
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
USER jovyan
2019-09-26 19:58:53 +02:00
# Custom jupyter-server-proxy to load vnc.html instead of /
RUN /opt/conda/bin/pip install https://github.com/manics/jupyter-server-proxy/archive/indexpage.zip
RUN conda install -y -q -c manics/label/testing websockify
ADD jupyter_notebook_config.py /home/jovyan/.jupyter/jupyter_notebook_config.py
# 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
WORKDIR ${HOME}
# Both these should work:
# http://127.0.0.1:8888/desktop
2019-09-26 19:58:53 +02:00
# http://localhost:5901/vnc.html