Move the user creation.

This commit is contained in:
Andrea Dell'Amico 2023-03-16 16:07:24 +01:00
parent 445c6add40
commit af9320f5b2
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 8 additions and 8 deletions

View File

@ -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 \