From ce786d7cfa26b12088fc047041af41696ff1793e Mon Sep 17 00:00:00 2001 From: Steffen Vogel <post@steffenvogel.de> Date: Thu, 26 Mar 2020 19:11:40 +0100 Subject: [PATCH] optimize building process by merging layers --- Dockerfile | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index b3dbde1..dc7806e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,19 +7,10 @@ ADD environment.yml /tmp/environment.yml USER root RUN sed -i "s|name\: jupyter-example-profile|name\: base|g" /tmp/environment.yml # we need to replace the name of the environment with base such that we can update the base environment here USER $NB_USER -RUN conda env update -f /tmp/environment.yml # All packages specified in environment.yml are installed in the base environment -# Execute postBuild script -ADD postBuild.sh /tmp/postBuild.sh -# Make the file executable (TODO: is this still needed?) -USER root -RUN chmod +x /tmp/postBuild.sh -# -USER $NB_USER -RUN /tmp/postBuild.sh - -# Cleanup conda packages -RUN conda clean --all -f -y +# All packages specified in environment.yml are installed in the base environment +RUN conda env update -f /tmp/environment.yml && \ + conda clean -a -f -y ENV JUPYTER_ENABLE_LAB=yes -- GitLab