build: use uid of user building the build containers
This commit is contained in:
committed by
SomberNight
parent
08ae0a73b2
commit
ab073827cf
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user