From bf50e5af540393631a86a222a355be0fdec31d97 Mon Sep 17 00:00:00 2001 From: zah Date: Mon, 19 Dec 2022 18:49:25 +0200 Subject: [PATCH] Publish official docker images for the Nimbus validator client (#4439) Fixes https://github.com/status-im/nimbus-eth2/issues/4426 --- .github/workflows/release.yml | 20 +++++++++++++++++--- docker/dist/binaries/Dockerfile.vc.amd64 | 15 +++++++++++++++ docker/dist/binaries/Dockerfile.vc.arm | 19 +++++++++++++++++++ docker/dist/binaries/Dockerfile.vc.arm64 | 20 ++++++++++++++++++++ 4 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 docker/dist/binaries/Dockerfile.vc.amd64 create mode 100644 docker/dist/binaries/Dockerfile.vc.arm create mode 100644 docker/dist/binaries/Dockerfile.vc.arm64 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2fab404af..f775cbabe6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,7 +45,7 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push a Docker image for end users + - name: Build and push a Docker images for end users run: | cd dist tar -xzf ${{ steps.make_dist.outputs.archive }} @@ -56,6 +56,10 @@ jobs: DOCKER_BUILDKIT=1 docker build -f Dockerfile.amd64 -t statusim/nimbus-eth2:amd64-${TAG} -t statusim/nimbus-eth2:amd64-latest . docker push statusim/nimbus-eth2:amd64-${TAG} docker push statusim/nimbus-eth2:amd64-latest + + DOCKER_BUILDKIT=1 docker build -f Dockerfile.vc.amd64 -t statusim/nimbus-validator-client:amd64-${TAG} -t statusim/nimbus-validator-client:amd64-latest . + docker push statusim/nimbus-validator-client:amd64-${TAG} + docker push statusim/nimbus-validator-client:amd64-latest - name: Setup ruby # Needed for fpm uses: ruby/setup-ruby@v1 with: @@ -118,7 +122,7 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push a Docker image for end users + - name: Build and push a Docker images for end users run: | cd dist tar -xzf ${{ steps.make_dist.outputs.archive }} @@ -127,9 +131,14 @@ jobs: REFNAME="${{ github.ref }}" TAG="${REFNAME#refs/tags/}" cp -a /usr/bin/qemu-aarch64-static . + DOCKER_BUILDKIT=1 docker build -f Dockerfile.arm64 -t statusim/nimbus-eth2:arm64-${TAG} -t statusim/nimbus-eth2:arm64-latest . docker push statusim/nimbus-eth2:arm64-${TAG} docker push statusim/nimbus-eth2:arm64-latest + + DOCKER_BUILDKIT=1 docker build -f Dockerfile.vc.arm64 -t statusim/nimbus-validator-client:arm64-${TAG} -t statusim/nimbus-validator-client:arm64-latest . + docker push statusim/nimbus-validator-client:arm64-${TAG} + docker push statusim/nimbus-validator-client:arm64-latest - name: Setup ruby # Needed for fpm uses: ruby/setup-ruby@v1 with: @@ -192,7 +201,7 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push a Docker image for end users + - name: Build and push a Docker images for end users run: | cd dist tar -xzf ${{ steps.make_dist.outputs.archive }} @@ -204,6 +213,11 @@ jobs: DOCKER_BUILDKIT=1 docker build -f Dockerfile.arm -t statusim/nimbus-eth2:arm-${TAG} -t statusim/nimbus-eth2:arm-latest . docker push statusim/nimbus-eth2:arm-${TAG} docker push statusim/nimbus-eth2:arm-latest + + DOCKER_BUILDKIT=1 docker build -f Dockerfile.vc.arm -t statusim/nimbus-validator-client:arm-${TAG} -t statusim/nimbus-validator-client:arm-latest . + docker push statusim/nimbus-validator-client:arm-${TAG} + docker push statusim/nimbus-validator-client:arm-latest + - name: Setup ruby # Needed for fpm uses: ruby/setup-ruby@v1 with: diff --git a/docker/dist/binaries/Dockerfile.vc.amd64 b/docker/dist/binaries/Dockerfile.vc.amd64 new file mode 100644 index 0000000000..5239f5bcd4 --- /dev/null +++ b/docker/dist/binaries/Dockerfile.vc.amd64 @@ -0,0 +1,15 @@ +FROM debian:bullseye-slim + +SHELL ["/bin/bash", "-c"] + +# Likely to match the first regular user:group created on the host. +RUN addgroup --gid 1000 user; \ + adduser --disabled-password --gecos '' --uid 1000 --gid 1000 user; + +USER user + +STOPSIGNAL SIGINT + +COPY "nimbus-eth2/build/nimbus_validator_client" "/home/user/nimbus_validator_client" +WORKDIR "/home/user/" +ENTRYPOINT ["/home/user/nimbus_validator_client"] diff --git a/docker/dist/binaries/Dockerfile.vc.arm b/docker/dist/binaries/Dockerfile.vc.arm new file mode 100644 index 0000000000..02beec91d1 --- /dev/null +++ b/docker/dist/binaries/Dockerfile.vc.arm @@ -0,0 +1,19 @@ +FROM arm32v7/debian:bullseye-slim + +SHELL ["/bin/bash", "-c"] + +# We need the host's registered binfmt_misc "interpreter" inside the container, +# for that transparent virtualisation to work. +COPY "qemu-arm-static" "/usr/bin/" + +# Likely to match the first regular user:group created on the host. +RUN addgroup --gid 1000 user; \ + adduser --disabled-password --gecos '' --uid 1000 --gid 1000 user; + +USER user + +STOPSIGNAL SIGINT + +COPY "nimbus-eth2/build/nimbus_validator_client" "/home/user/nimbus_validator_client" +WORKDIR "/home/user/" +ENTRYPOINT ["/home/user/nimbus_validator_client"] diff --git a/docker/dist/binaries/Dockerfile.vc.arm64 b/docker/dist/binaries/Dockerfile.vc.arm64 new file mode 100644 index 0000000000..3657e72fcc --- /dev/null +++ b/docker/dist/binaries/Dockerfile.vc.arm64 @@ -0,0 +1,20 @@ +FROM arm64v8/debian:bullseye-slim + +SHELL ["/bin/bash", "-c"] + +# We need the host's registered binfmt_misc "interpreter" inside the container, +# for that transparent virtualisation to work. +COPY "qemu-aarch64-static" "/usr/bin/" + +# Likely to match the first regular user:group created on the host. +RUN addgroup --gid 1000 user; \ + adduser --disabled-password --gecos '' --uid 1000 --gid 1000 user; + +USER user + +STOPSIGNAL SIGINT + +COPY "nimbus-eth2/build/nimbus_validator_client" "/home/user/nimbus_validator_client" +WORKDIR "/home/user/" +ENTRYPOINT ["/home/user/nimbus_validator_client"] +