Permissions fix hopefully...

This commit is contained in:
2026-03-19 15:14:05 +01:00 Verified
parent 0420070f34
commit 17bc51166a
+6
View File
@@ -58,12 +58,18 @@ FROM scala AS lth
# Clears apt lists
RUN rm -rf /var/lib/apt/lists/*
# Adds the default User
ARG USER=lth-student
RUN useradd --groups sudo --no-create-home --shell /bin/bash ${USER} \
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${USER} \
&& chmod 0440 /etc/sudoers.d/${USER}
# Create home directory and set ownership
USER root
RUN mkdir -p /home/${USER} && chown -R ${USER}:${USER} /home/${USER}
# Sets user and work directory
USER ${USER}
WORKDIR /home/${USER}