From 17bc51166aa6e6dd7f913f19b6baf8e9dacb7aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20S=C3=B6derberg?= Date: Mon, 20 Oct 2025 15:12:07 +0200 Subject: [PATCH] Permissions fix hopefully... --- build/Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/Dockerfile b/build/Dockerfile index af02750..2c4594e 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -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} \ No newline at end of file