From 48b399097318f7ad8fc79e0ccd0904bd7dca86a4 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Mon, 22 Jul 2024 21:16:18 +0100 Subject: [PATCH] Don't remove home dir --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index e90117fe2..01ef9174b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -92,9 +92,9 @@ USER root COPY ./before-notebook.d/* /usr/local/bin/before-notebook.d/ RUN fix-permissions "${CONDA_DIR}" -# REMOVE HOME -RUN find /home/${NB_USER}/ -delete +# Remove content of $HOME +# '-mindepth=1' ensures that we do not remove the home directory itself. +RUN find /home/${NB_USER}/ -mindepth 1 -delete -WORKDIR "/home/${NB_USER}" -RUN fix-permissions "/home/${NB_USER}" USER ${NB_USER} +WORKDIR "/home/${NB_USER}"