Permissions fix hopefully...
This commit is contained in:
@@ -58,12 +58,18 @@ FROM scala AS lth
|
|||||||
# Clears apt lists
|
# Clears apt lists
|
||||||
RUN rm -rf /var/lib/apt/lists/*
|
RUN rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Adds the default User
|
# Adds the default User
|
||||||
ARG USER=lth-student
|
ARG USER=lth-student
|
||||||
RUN useradd --groups sudo --no-create-home --shell /bin/bash ${USER} \
|
RUN useradd --groups sudo --no-create-home --shell /bin/bash ${USER} \
|
||||||
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${USER} \
|
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/${USER} \
|
||||||
&& chmod 0440 /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
|
# Sets user and work directory
|
||||||
USER ${USER}
|
USER ${USER}
|
||||||
WORKDIR /home/${USER}
|
WORKDIR /home/${USER}
|
||||||
Reference in New Issue
Block a user