Skip to content

Commit 803a1c2

Browse files
bollwyvlconsideRatio
authored andcommitted
ensure existence/permissions on custom target dir, if doesn't exist, repo copy slash
1 parent be7fc8a commit 803a1c2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

repo2docker/buildpacks/base.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@
105105
106106
# Allow target path repo is cloned to be configurable
107107
ARG REPO_DIR=${HOME}
108-
ENV REPO_DIR ${REPO_DIR}
108+
RUN [ ! -d ${REPO_DIR} ] \
109+
&& mkdir -p ${REPO_DIR} \
110+
&& chown -R ${NB_USER}:${NB_USER} ${REPO_DIR}
109111
WORKDIR ${REPO_DIR}
110112
RUN chown ${NB_USER}:${NB_USER} ${REPO_DIR}
111113
@@ -144,7 +146,7 @@
144146
USER root
145147
146148
# Copy stuff.
147-
COPY --chown={{ user }}:{{ user }} src/ ${REPO_DIR}
149+
COPY --chown={{ user }}:{{ user }} src/ ${REPO_DIR}/
148150
149151
# Run assemble scripts! These will actually turn the specification
150152
# in the repository into an image.

0 commit comments

Comments
 (0)