Merge pull request #1351 from jooola/feat/ci_allow_sudo

Allow ci image user to run sudo without password
This commit is contained in:
Kyle Robbertze 2021-09-16 20:34:17 +00:00 committed by GitHub
commit 7731197c46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -70,13 +70,17 @@ jobs:
DEBIAN_FRONTEND=noninteractive apt-get -y install \
python3 \
python3-pip \
sudo \
$(cat packages.list)
ARG USER=docker
ARG UID=1000
ARG GID=1000
RUN useradd -m ${USER} --uid=${UID}
RUN adduser --disabled-password --uid=${UID} --gecos '' ${USER} && \
adduser ${USER} sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER ${UID}:${GID}
WORKDIR /home/${USER}
EOF