Copy fix-permissions before creating the user.

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

View File

@ -46,6 +46,10 @@ 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
# Copy a script that we will use to correct permissions after running certain commands
COPY fix-permissions /usr/local/bin/fix-permissions
RUN chmod a+rx /usr/local/bin/fix-permissions
# 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 && \
@ -66,9 +70,6 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/* && \
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen
# Copy a script that we will use to correct permissions after running certain commands
COPY fix-permissions /usr/local/bin/fix-permissions
RUN chmod a+rx /usr/local/bin/fix-permissions
# Enable prompt color in the skeleton .bashrc before creating the default NB_USER
# hadolint ignore=SC2016