1
0

build: use uid of user building the build containers

This commit is contained in:
Sander van Grieken
2023-03-19 14:29:29 +01:00
committed by SomberNight
parent 08ae0a73b2
commit ab073827cf
8 changed files with 20 additions and 4 deletions

View File

@@ -4,6 +4,8 @@
FROM debian:buster@sha256:233c3bbc892229c82da7231980d50adceba4db56a08c0b7053a4852782703459
ARG UID=1000
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
@@ -75,7 +77,7 @@ ENV USER="user"
ENV HOME_DIR="/home/${USER}"
ENV WORK_DIR="${HOME_DIR}/wspace" \
PATH="${HOME_DIR}/.local/bin:${PATH}"
RUN useradd --create-home --shell /bin/bash ${USER}
RUN useradd --uid $UID --create-home --shell /bin/bash ${USER}
RUN usermod -append --groups sudo ${USER}
RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
WORKDIR ${WORK_DIR}