Set REPO_PATH as late as possible

Leads to maximum cache re-use
pull/507/head
yuvipanda 2018-12-17 14:58:49 -08:00
rodzic 3dfe0a8143
commit 0f3076387a
1 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -38,15 +38,10 @@ ARG NB_UID
ENV USER ${NB_USER}
ENV HOME /home/${NB_USER}
# Allow target path repo is cloned to be configurable
ARG REPO_PATH=${HOME}
ENV REPO_PATH ${REPO_PATH}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
WORKDIR ${REPO_PATH}
RUN wget --quiet -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
DISTRO="bionic" && \
@ -102,6 +97,11 @@ COPY {{ src }} {{ dst }}
{{sd}}
{% endfor %}
# Allow target path repo is cloned to be configurable
ARG REPO_PATH=${HOME}
ENV REPO_PATH ${REPO_PATH}
WORKDIR ${REPO_PATH}
# Copy and chown stuff. This doubles the size of the repo, because
# you can't actually copy as USER, only as root! Thanks, Docker!
USER root