Add runner user to sudo group
This commit is contained in:
parent
b8b4ef4b60
commit
f2dcb5659d
|
|
@ -4,14 +4,16 @@ ARG RUNNER_VERSION
|
|||
ARG DOCKER_VERSION
|
||||
|
||||
RUN apt update \
|
||||
&& apt install curl ca-certificates -y --no-install-recommends \
|
||||
&& apt install sudo curl ca-certificates -y --no-install-recommends \
|
||||
&& curl -L -o docker.tgz https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz \
|
||||
&& tar zxvf docker.tgz \
|
||||
&& install -o root -g root -m 755 docker/docker /usr/local/bin/docker \
|
||||
&& rm -rf docker docker.tgz \
|
||||
&& curl -L -o /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 \
|
||||
&& chmod +x /usr/local/bin/dumb-init \
|
||||
&& adduser --disabled-password --gecos "" --uid 1000 runner
|
||||
&& adduser --disabled-password --gecos "" --uid 1000 runner \
|
||||
&& usermod -aG sudo runner \
|
||||
&& echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers
|
||||
|
||||
RUN mkdir -p /runner \
|
||||
&& cd /runner \
|
||||
|
|
|
|||
Loading…
Reference in New Issue