From c6a9d62d17d6b142a366c612d237ab3229c242ad Mon Sep 17 00:00:00 2001 From: eroan-marie Date: Thu, 28 Nov 2024 11:52:55 +0100 Subject: [PATCH] fix: user misconfiguration --- base-image/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base-image/Dockerfile b/base-image/Dockerfile index 385b2d3b..d4bec82e 100644 --- a/base-image/Dockerfile +++ b/base-image/Dockerfile @@ -140,7 +140,7 @@ ONBUILD RUN echo "Checking for 'jupyter_notebook_config.py'..." \ && cp jupyter_notebook_config.py /etc/jupyter \ ; fi -# ONBUILD USER ${NB_USER} +ONBUILD USER ${NB_USER} # We want to keep our images as reproducible as possible. If a lock # file with exact versions of all required packages is present, we use @@ -184,6 +184,9 @@ ONBUILD RUN echo "Checking for pip 'requirements.txt'..." \ ${NB_PYTHON_PREFIX}/bin/pip install --no-cache -r requirements.txt \ ; fi + +ONBUILD USER root + ONBUILD COPY resources/layer-cleanup.sh /usr/local/bin ONBUILD RUN chmod +x /usr/local/bin/layer-cleanup.sh @@ -192,6 +195,7 @@ ONBUILD RUN for script in $(find "resources" -type f -name "install.sh"); do \ echo "Executing $script"; \ bash "$script"; \ layer-cleanup.sh; \ + chown -R ${NB_USER}:${NB_USER} ${HOME}; \ done ONBUILD USER ${NB_USER}