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

@@ -2,6 +2,8 @@
FROM debian:bullseye@sha256:43ef0c6c3585d5b406caa7a0f232ff5a19c1402aeb415f68bcd1cf9d10180af8
ARG UID=1000
ENV DEBIAN_FRONTEND=noninteractive
ENV ANDROID_HOME="/opt/android"
@@ -145,7 +147,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}