erigontech / erigon

Ethereum implementation on the efficiency frontier https://erigon.gitbook.io
GNU Lesser General Public License v3.0
3.1k stars 1.09k forks source link

New docker images break CI #11932

Open yorickdowne opened 1 week ago

yorickdowne commented 1 week ago

Issue

The linux/amd64/v2 architecture on the new latest and 2.60.7 tags on erigontech/erigon fails on Github CI runners, with a note that no matching architecture was found.

Suggested solution

Use linux/amd64 architecture like on the main-latest tag. This will allow the image to be pulled on a broad range of x64 implementations.

lystopad commented 5 days ago

Hi, @yorickdowne.

Please, provide peace of your workflow where I can see runner configuration and how docker image pulled.

yorickdowne commented 5 days ago
jobs:
  test-lodestar-erigon:
    if: |
      contains(github.event.pull_request.labels.*.name, 'test-lodestar') ||
      contains(github.event.pull_request.labels.*.name, 'test-erigon') ||
      contains(github.event.pull_request.labels.*.name, 'test-all') ||
      github.event_name == 'push'
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Set up Docker buildx
        uses: docker/setup-buildx-action@v3
      - name: Create .env file
        run: cp default.env .env
      - name: Set Lodestar/Erigon
        run: |
          source ./.github/helper.sh
          COMPOSE_FILE=lodestar.yml:erigon.yml
          var=COMPOSE_FILE
          set_value_in_env
          FEE_RECIPIENT=0xDccf8451070a86183eE70D330C4c43b686E9CF86
          var=FEE_RECIPIENT
          set_value_in_env
      - name: Start Lodestar/Erigon
        run: ./ethd up

./ethd up in turn is docker compose up -d

The erigon.yml contains this for the image:

services:
  execution:
    restart: "unless-stopped"
    build:
      context: ./erigon
      dockerfile: ${ERIGON_DOCKERFILE}
      args:
        - BUILD_TARGET=${ERIGON_SRC_BUILD_TARGET:-'$(git describe --tags $(git rev-list --tags --max-count=1))'}
        - SRC_REPO=${ERIGON_SRC_REPO:-https://github.com/ledgerwatch/erigon}
        - DOCKER_TAG=${ERIGON_DOCKER_TAG:-stable}
        - DOCKER_REPO=${ERIGON_DOCKER_REPO:-thorax/erigon}
    stop_grace_period: 5m
    image: erigon:local

The Dockerfile.binary that would be referenced from this contains:

ARG DOCKER_TAG=latest
ARG DOCKER_REPO=erigontech/erigon

FROM ${DOCKER_REPO}:${DOCKER_TAG}

The defaults don't apply here because we have this from the .env:

ERIGON_DOCKER_TAG=latest                                                                                                
ERIGON_DOCKER_REPO=erigontech/erigon                                                                                    
ERIGON_DOCKERFILE=Dockerfile.binary

This is how the action fails:

#6 [execution internal] load metadata for docker.io/erigontech/erigon:latest
#6 ERROR: no match for platform in manifest: not found
failed to solve: erigontech/erigon:latest: failed to resolve source metadata for docker.io/erigontech/erigon:latest: no match for platform in manifest: not found

The platform for latest is linux/amd64/v2. I am convinced that if it was linux/amd64, this would work in Github's ubuntu:latest runner.

The thorax/erigon repo works with the same runner and same workflow/action.

lystopad commented 5 days ago

Thank you. I need some time to review it. I will back to you later, prob. tomorrow.

lystopad commented 4 days ago

@yorickdowne , hi Please, try this image -- erigontech/erigon:main-1eff2f4 It is multi-platform docker image supporting two platforms -- linux/arm64 and linux/amd64. But binaries for amd64 Architecture was built using GOAMD64=v2. Let me know how it works in your case.

yorickdowne commented 4 days ago

@lystopad That tag works great with my Github runner

#5 [execution internal] load metadata for docker.io/erigontech/erigon:main-1eff2f4
#5 DONE 0.5s
#9 [execution internal] load .dockerignore
#9 transferring context: 2B done
#9 DONE 0.0s
#10 [execution internal] load build context
#10 transferring context: 5.79kB done
#10 DONE 0.0s
#11 [execution 1/5] FROM docker.io/erigontech/erigon:main-1eff2f4@sha256:279228902f45eadbdb2d6230059e99c6f9d9e7f684e7088dac05ade21f542e36
#11 resolve docker.io/erigontech/erigon:main-1eff2f4@sha256:279228902f45eadbdb2d6230059e99c6f9d9e7f684e7088dac05ade21f542e36 done
#11 sha256:43c4[26](https://github.com/eth-educators/eth-docker/actions/runs/10860232023/job/30140573291?pr=1923#step:6:27)4eed91be63b206e17d93e75256a6097070ce643c5e8f0379998b44f170 3.62MB / 3.62MB 0.1s done
#11 extracting sha256:43c4264eed91be63b206e17d93e75256a6097070ce643c5e8f0379998b44f170
#11 extracting sha256:43c4264eed91be63b206e17d93e75256a6097070ce643c5e8f0379998b44f170 0.1s done