diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3cb22ca..c0ef2d7 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -90,29 +90,37 @@ jobs: platforms: ${{ matrix.arch }} nethermind: runs-on: ubuntu-latest + strategy: + matrix: + platform: [linux/amd64, linux/arm64] 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: linux/amd64,linux/arm64 + + - 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: Set up Docker Buildx - 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: nethermind/Dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index 9068905..2f29bc7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,8 @@ services: - "8545:8545" # RPC - "8546:8546" # websocket - "7301:6060" # metrics + - "30303:30303" # P2P TCP + - "30303:30303/udp" # P2P UDP command: [ "bash", "./execution-entrypoint" ] volumes: - ${HOST_DATA_DIR}:/data diff --git a/nethermind/Dockerfile b/nethermind/Dockerfile index e4fbd29..11c45cd 100644 --- a/nethermind/Dockerfile +++ b/nethermind/Dockerfile @@ -19,12 +19,16 @@ ARG TARGETARCH WORKDIR /app -ENV REPO=https://github.com/nethermindeth/nethermind -ENV VERSION=1.28.0 -RUN git clone $REPO . && git checkout $VERSION - -RUN arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \ - dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false +ENV REPO=https://github.com/NethermindEth/nethermind.git +ENV VERSION=1.29.0 +ENV COMMIT=10412d1c3b502591db7d4bb80d26caf6045f165a +RUN git clone $REPO --branch release/$VERSION --single-branch . && \ + git switch -c branch-$VERSION +RUN bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' +RUN TARGETARCH=${TARGETARCH#linux/} && \ + arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \ + echo "Using architecture: $arch" && \ + dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false FROM mcr.microsoft.com/dotnet/aspnet:8.0-noble @@ -43,4 +47,4 @@ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY nethermind/nethermind-entrypoint ./execution-entrypoint COPY op-node-entrypoint . -CMD ["/usr/bin/supervisord"] \ No newline at end of file +CMD ["/usr/bin/supervisord"]