Skip to content
Snippets Groups Projects
Commit dc378c97 authored by Corné Lukken's avatar Corné Lukken
Browse files

L2SS-665: Prevent failure when home directory already exists

parent 65783fea
No related branches found
No related tags found
1 merge request!278L2SS-665: Install pip packages as user
...@@ -5,9 +5,8 @@ FROM ${SOURCE_IMAGE} ...@@ -5,9 +5,8 @@ FROM ${SOURCE_IMAGE}
# that are needed for temporary storage the proper owner and access rights. # that are needed for temporary storage the proper owner and access rights.
ARG CONTAINER_EXECUTION_UID=1000 ARG CONTAINER_EXECUTION_UID=1000
# Create homedir # Create new user with uid but only if uid not used
RUN sudo adduser --uid ${CONTAINER_EXECUTION_UID} --gid ${CONTAINER_EXECUTION_UID} --home ${HOME} user || exit 0 RUN sudo adduser --disabled-password --system --uid ${CONTAINER_EXECUTION_UID} --no-create-home --home ${HOME} user || exit 0
RUN sudo echo "PATH=${HOME}/.local/bin:\$PATH" >> ~/.bashrc
RUN sudo chown ${CONTAINER_EXECUTION_UID} -R ${HOME} RUN sudo chown ${CONTAINER_EXECUTION_UID} -R ${HOME}
COPY requirements.txt ./ COPY requirements.txt ./
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment