forked from yuvipanda/jupyter-desktop-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request yuvipanda#13 from consideRatio/pr/refactor-dockerfile
Remove apt.txt and refactor Dockerfile
- Loading branch information
Showing
4 changed files
with
36 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,37 @@ | ||
FROM jupyter/base-notebook:python-3.7.6 | ||
|
||
FROM jupyter/base-notebook | ||
|
||
USER root | ||
|
||
RUN apt-get -y update \ | ||
&& apt-get install -y dbus-x11 \ | ||
firefox \ | ||
xfce4 \ | ||
xfce4-panel \ | ||
xfce4-session \ | ||
xfce4-settings \ | ||
xorg \ | ||
xubuntu-icon-theme | ||
RUN apt-get -y -q update \ | ||
&& apt-get -y -q upgrade \ | ||
&& apt-get -y -q install \ | ||
dbus-x11 \ | ||
firefox \ | ||
xfce4 \ | ||
xfce4-panel \ | ||
xfce4-session \ | ||
xfce4-settings \ | ||
xorg \ | ||
xubuntu-icon-theme \ | ||
# chown $HOME to workaround that the xorg installation creates a | ||
# /home/jovyan/.cache directory owned by root | ||
&& chown -R $NB_UID:$NB_GID $HOME \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Remove light-locker to prevent screen lock | ||
# Install TurboVNC (https://github.com/TurboVNC/turbovnc) | ||
ARG TURBOVNC_VERSION=2.2.6 | ||
RUN wget -q "https://sourceforge.net/projects/turbovnc/files/${TURBOVNC_VERSION}/turbovnc_${TURBOVNC_VERSION}_amd64.deb/download" -O turbovnc_${TURBOVNC_VERSION}_amd64.deb && \ | ||
apt-get install -y -q ./turbovnc_${TURBOVNC_VERSION}_amd64.deb && \ | ||
apt-get remove -y -q light-locker && \ | ||
rm ./turbovnc_${TURBOVNC_VERSION}_amd64.deb && \ | ||
ln -s /opt/TurboVNC/bin/* /usr/local/bin/ | ||
|
||
# apt-get may result in root-owned directories/files under $HOME | ||
RUN chown -R $NB_UID:$NB_GID $HOME | ||
RUN wget -q "https://sourceforge.net/projects/turbovnc/files/${TURBOVNC_VERSION}/turbovnc_${TURBOVNC_VERSION}_amd64.deb/download" -O turbovnc.deb \ | ||
&& apt-get install -y -q ./turbovnc.deb \ | ||
# remove light-locker to prevent screen lock | ||
&& apt-get remove -y -q light-locker \ | ||
&& rm ./turbovnc.deb \ | ||
&& ln -s /opt/TurboVNC/bin/* /usr/local/bin/ | ||
|
||
ADD . /opt/install | ||
COPY jupyter_desktop /opt/install/jupyter_desktop | ||
COPY setup.py MANIFEST.in README.md LICENSE /opt/install/ | ||
RUN fix-permissions /opt/install | ||
|
||
USER $NB_USER | ||
RUN cd /opt/install && \ | ||
conda env update -n base --file environment.yml | ||
RUN cd /opt/install \ | ||
&& mamba install -y websockify \ | ||
&& pip install -e . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters