forked from jupyterhub/jupyter-remote-desktop-proxy
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
59 lines (53 loc) · 2.09 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM quay.io/jupyter/base-notebook@sha256:116c6982d52b25e5cdd459c93bb624718ecb2f13c603e72001a6bf8b85468a00
USER root
RUN apt-get -y -qq update \
&& apt-get -y -qq install \
dbus-x11 \
# xclip is added as jupyter-remote-desktop-proxy's tests requires it
xclip \
xfce4 \
xfce4-panel \
xfce4-session \
xfce4-settings \
xorg \
xubuntu-icon-theme \
fonts-dejavu \
# Disable the automatic screenlock since the account password is unknown
&& apt-get -y -qq remove xfce4-screensaver \
# chown $HOME to workaround that the xorg installation creates a
# /home/jovyan/.cache directory owned by root
# Create /opt/install to ensure it's writable by pip
&& mkdir -p /opt/install \
&& chown -R $NB_UID:$NB_GID $HOME /opt/install \
&& rm -rf /var/lib/apt/lists/*
# Install a VNC server, either TigerVNC (default) or TurboVNC
ARG vncserver=tigervnc
RUN if [ "${vncserver}" = "tigervnc" ]; then \
echo "Installing TigerVNC"; \
apt-get -y -qq update; \
apt-get -y -qq install \
tigervnc-standalone-server \
; \
rm -rf /var/lib/apt/lists/*; \
fi
ENV PATH=/opt/TurboVNC/bin:$PATH
RUN if [ "${vncserver}" = "turbovnc" ]; then \
echo "Installing TurboVNC"; \
# Install instructions from https://turbovnc.org/Downloads/YUM
wget -q -O- https://packagecloud.io/dcommander/turbovnc/gpgkey | \
gpg --dearmor >/etc/apt/trusted.gpg.d/TurboVNC.gpg; \
wget -O /etc/apt/sources.list.d/TurboVNC.list https://raw.githubusercontent.com/TurboVNC/repo/main/TurboVNC.list; \
apt-get -y -qq update; \
apt-get -y -qq install \
turbovnc \
; \
rm -rf /var/lib/apt/lists/*; \
fi
USER $NB_USER
# Install the environment first, and then install the package separately for faster rebuilds
COPY --chown=$NB_UID:$NB_GID environment.yml /tmp
RUN . /opt/conda/bin/activate && \
mamba env update --quiet --file /tmp/environment.yml
COPY --chown=$NB_UID:$NB_GID . /opt/install
RUN . /opt/conda/bin/activate && \
pip install /opt/install