feat: use new uid for 22.04 images (#2079)

* feat: use new uid for 22.04 images

* feat: use new gid for docker group

Co-authored-by: toast-gear <toast-gear@users.noreply.github.com>
This commit is contained in:
Callum Tait 2022-12-07 05:14:31 +00:00 committed by GitHub
parent fe05987eea
commit ad1989072e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -8,6 +8,8 @@ ARG CHANNEL=stable
ARG DOCKER_VERSION=20.10.21
ARG DOCKER_COMPOSE_VERSION=v2.12.2
ARG DUMB_INIT_VERSION=1.2.5
ARG RUNNER_USER_UID=1001
ARG DOCKER_GROUP_GID=121
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y \
@ -25,8 +27,8 @@ RUN apt-get update -y \
zip \
&& rm -rf /var/lib/apt/lists/*
RUN adduser --disabled-password --gecos "" --uid 1000 runner \
&& groupadd docker \
RUN adduser --disabled-password --gecos "" --uid $RUNNER_USER_UID runner \
&& groupadd docker --gid $DOCKER_GROUP_GID \
&& usermod -aG sudo runner \
&& usermod -aG docker runner \
&& echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \