From 8c263f37a58e90a1cae98ef72b7df39b297eacb4 Mon Sep 17 00:00:00 2001 From: Francis Li Date: Sat, 1 Feb 2025 10:23:51 -0800 Subject: [PATCH 1/7] Update build-push-action to latest v6 --- .github/workflows/docker.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4b9c421b..9a1438a3 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,9 +3,9 @@ name: Tag Docker image on: push: branches: - - 'main' + - "main" tags: - - 'v*' + - "v*" env: REGISTRY: ghcr.io @@ -41,7 +41,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Build and push the Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . file: geth/Dockerfile @@ -78,7 +78,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Build and push the Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . file: reth/Dockerfile @@ -96,29 +96,29 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - + - name: Log into the Container registry uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - + - name: Set up QEMU uses: docker/setup-qemu-action@v2 with: platforms: ${{ matrix.arch }} - + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - + - name: Extract metadata for the Docker image id: meta uses: docker/metadata-action@v4 with: images: | ${{ env.NAMESPACE }}/${{ env.NETHERMIND_IMAGE_NAME }} - + - name: Build and push the Docker image uses: docker/build-push-action@v6 with: From b7794c23b06301992b78e5da7efb3d4908404c22 Mon Sep 17 00:00:00 2001 From: Francis Li Date: Sat, 1 Feb 2025 10:37:07 -0800 Subject: [PATCH 2/7] Setup QEMU --- .github/workflows/docker.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9a1438a3..0e115ed2 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -29,6 +29,11 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: linux/amd64,linux/arm64 + - name: Extract metadata for the Docker image id: meta uses: docker/metadata-action@v4 From 358c716ed3a11ba1970fc862ed9e9d208573b943 Mon Sep 17 00:00:00 2001 From: Francis Li Date: Sat, 1 Feb 2025 14:33:46 -0800 Subject: [PATCH 3/7] Update on PR --- .github/workflows/pr.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 8900322b..d3951272 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -9,16 +9,23 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - arch: [ linux/amd64, linux/arm64 ] + arch: [linux/amd64, linux/arm64] steps: - name: Checkout uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} + + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v2 + # with: + # platforms: linux/amd64,linux/arm64 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Build the Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . file: geth/Dockerfile @@ -39,7 +46,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Build the Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . file: reth/Dockerfile @@ -51,7 +58,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - arch: [ linux/amd64 ] + arch: [linux/amd64] steps: - name: Checkout uses: actions/checkout@v3 @@ -66,4 +73,3 @@ jobs: file: nethermind/Dockerfile push: false platforms: ${{ matrix.arch }} - From f5ab586ff72b03499946b7a03dda8982f38716de Mon Sep 17 00:00:00 2001 From: Francis Li Date: Sat, 1 Feb 2025 14:47:55 -0800 Subject: [PATCH 4/7] Add QEMU on PR as well --- .github/workflows/pr.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d3951272..5b0a58ed 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -16,10 +16,10 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v2 - # with: - # platforms: linux/amd64,linux/arm64 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: linux/amd64,linux/arm64 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 From 485a5433173d794772153a45ac29224da949cd8c Mon Sep 17 00:00:00 2001 From: Francis Li Date: Sat, 1 Feb 2025 15:40:42 -0800 Subject: [PATCH 5/7] remove -static --- geth/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geth/Dockerfile b/geth/Dockerfile index e162ef34..d75b7837 100644 --- a/geth/Dockerfile +++ b/geth/Dockerfile @@ -26,7 +26,7 @@ RUN git clone $REPO --branch $VERSION --single-branch . && \ git switch -c branch-$VERSION && \ bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' -RUN go run build/ci.go install -static ./cmd/geth +RUN go run build/ci.go install ./cmd/geth FROM ubuntu:22.04 From f33341e007645814eff3021b9cae62cdc6270928 Mon Sep 17 00:00:00 2001 From: Francis Li Date: Sat, 1 Feb 2025 15:52:28 -0800 Subject: [PATCH 6/7] Install build-essential --- geth/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/geth/Dockerfile b/geth/Dockerfile index d75b7837..29e2a390 100644 --- a/geth/Dockerfile +++ b/geth/Dockerfile @@ -19,6 +19,10 @@ FROM golang:1.22 AS geth WORKDIR /app +RUN apt-get update && \ + apt-get install -y \ + build-essential + ENV REPO=https://github.com/ethereum-optimism/op-geth.git ENV VERSION=v1.101411.6 ENV COMMIT=50b3422b9ac682a8fa503c4f409339a9bff69717 From c4c69cb6a4f529d5956a9b35f16e421e14134485 Mon Sep 17 00:00:00 2001 From: Francis Li Date: Sun, 2 Feb 2025 04:14:53 -0800 Subject: [PATCH 7/7] Add back static linking --- geth/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geth/Dockerfile b/geth/Dockerfile index 29e2a390..22e5232a 100644 --- a/geth/Dockerfile +++ b/geth/Dockerfile @@ -30,7 +30,7 @@ RUN git clone $REPO --branch $VERSION --single-branch . && \ git switch -c branch-$VERSION && \ bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' -RUN go run build/ci.go install ./cmd/geth +RUN go run build/ci.go install -static ./cmd/geth FROM ubuntu:22.04