This commit is contained in:
parent
e1f2b814b0
commit
0c233ec8df
1 changed files with 2 additions and 10 deletions
|
@ -2,16 +2,8 @@ FROM registry.opensuse.org/opensuse/leap:15.5
|
|||
|
||||
RUN zypper -n install sudo nodejs20
|
||||
|
||||
RUN groupadd -g 1001 "runner" \
|
||||
&& groupadd -g 1000 "runneradmin" \
|
||||
&& useradd -u 1001 -g "runner" -G sudo -m -s /bin/bash "runner" \
|
||||
&& useradd -u 1000 -g "runneradmin" -G sudo -m -s /bin/bash "runneradmin" \
|
||||
&& usermod -aG docker "runner" \
|
||||
&& usermod -aG docker "runneradmin" \
|
||||
{ \
|
||||
echo "runner ALL=(ALL) NOPASSWD: ALL" \
|
||||
echo "runneradmin ALL=(ALL) NOPASSWD: ALL" \
|
||||
} | tee -a /etc/sudoers
|
||||
RUN useradd -u 1001 runner
|
||||
RUN echo "runner ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/runner
|
||||
|
||||
WORKDIR /home/runner
|
||||
USER runner
|
Loading…
Reference in a new issue