From af9320f5b21dbcb1afa811cc3ed858af947a135f Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 16 Mar 2023 16:07:24 +0100 Subject: [PATCH] Move the user creation. --- Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1c248ca..11bb1c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,14 +27,6 @@ ENV SHELL=/bin/bash \ LANGUAGE=en_US.UTF-8 ENV HOME="/home/${NB_USER}" -# Create NB_USER with name jovyan user with UID=1000 and in the 'users' group -# and make sure these dirs are writable by the `users` group. -RUN echo "auth requisite pam_deny.so" >> /etc/pam.d/su && \ - sed -i.bak -e 's/^%admin/#%admin/' /etc/sudoers && \ - sed -i.bak -e 's/^%sudo/#%sudo/' /etc/sudoers && \ - chmod g+w /etc/passwd && \ - fix-permissions "${HOME}" - RUN apt-get update --yes && \ apt-get upgrade --yes && \ apt-get install --yes --no-install-recommends \ @@ -54,6 +46,14 @@ ADD 03_setup_root_path.sh /etc/cont-init.d/03_setup_root_path ADD 04_copy_env.sh /etc/cont-init.d/04_copy_env ADD 05_setup_rsession_parameters.sh /etc/cont-init.d/05_setup_rsession_parameters +# Create NB_USER with name jovyan user with UID=1000 and in the 'users' group +# and make sure these dirs are writable by the `users` group. +RUN echo "auth requisite pam_deny.so" >> /etc/pam.d/su && \ + sed -i.bak -e 's/^%admin/#%admin/' /etc/sudoers && \ + sed -i.bak -e 's/^%sudo/#%sudo/' /etc/sudoers && \ + chmod g+w /etc/passwd && \ + fix-permissions "${HOME}" + # Install the jupiterhub proxy RUN pip3 install \ jupyterhub \