diff --git a/repo2docker/buildpacks/base.py b/repo2docker/buildpacks/base.py index bc140f8a..3cb1ff2e 100644 --- a/repo2docker/buildpacks/base.py +++ b/repo2docker/buildpacks/base.py @@ -113,6 +113,7 @@ COPY --chown={{ user }}:{{ user }} {{ src }} {{ dst }} ARG REPO_DIR=${HOME} ENV REPO_DIR ${REPO_DIR} WORKDIR ${REPO_DIR} +RUN chown ${NB_USER}:${NB_USER} ${REPO_DIR} # We want to allow two things: # 1. If there's a .local/bin directory in the repo, things there diff --git a/tests/conda/repo-path/verify b/tests/conda/repo-path/verify index 0d938171..93f6fed6 100755 --- a/tests/conda/repo-path/verify +++ b/tests/conda/repo-path/verify @@ -13,5 +13,8 @@ assert sys.executable.startswith("/srv/conda/"), sys.executable assert os.path.exists("/srv/repo/verify") assert os.path.abspath(__file__) == "/srv/repo/verify" +# Repo should be writable +assert os.access("/srv/repo", os.W_OK) + # We should be able to import the package in environment.yml import numpy