Skip to content

Commit

Permalink
Update base-20.dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
BorisKofman committed Jan 24, 2024
1 parent d022019 commit 52e4a45
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions images/base-20.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,14 @@ RUN apt-get update && \
RUN export RUNNER_ARCH=${TARGETARCH} \
&& if [ "$RUNNER_ARCH" = "amd64" ]; then export DOCKER_ARCH=x86_64 ; fi \
&& if [ "$RUNNER_ARCH" = "arm64" ]; then export DOCKER_ARCH=aarch64 ; fi \
&& curl -kflLo docker.tgz https://download.docker.com/${TARGETOS}/static/stable/${DOCKER_ARCH}/docker-${DOCKER_VERSION}.tgz \
&& curl -fLo docker.tgz https://download.docker.com/${TARGETOS}/static/stable/${DOCKER_ARCH}/docker-${DOCKER_VERSION}.tgz \
&& tar zxvf docker.tgz \
&& rm -rf docker.tgz \
&& cp docker/docker /usr/bin/docker \
&& rm -rf docker \
&& mkdir -p /usr/local/lib/docker/cli-plugins \
&& curl -kflLo /usr/local/lib/docker/cli-plugins/docker-buildx \
&& curl -fLo /usr/local/lib/docker/cli-plugins/docker-buildx \
"https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION}/buildx-v${BUILDX_VERSION}.linux-${TARGETARCH}" \
&& chmod +x /usr/local/lib/docker/cli-plugins/docker-buildx

RUN groupadd docker --gid 123 \
&& usermod -aG sudo node \
&& usermod -aG docker node \
&& echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \
&& echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers

RUN install -o node -g docker -m 755 docker/* /usr/bin/ && rm -rf docker

USER node
&& chmod +x /usr/local/lib/docker/cli-plugins/docker-buildx \
&& groupadd docker --gid 123 \
&& usermod -aG docker root

0 comments on commit 52e4a45

Please sign in to comment.