Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running action with custom image fails randomly with "No such image" error #388

Open
3 tasks done
stavbernazport opened this issue Dec 11, 2024 · 3 comments
Open
3 tasks done

Comments

@stavbernazport
Copy link

stavbernazport commented Dec 11, 2024

Contributing guidelines

I've found a bug, and:

  • The documentation does not mention anything about my problem
  • There are no open or closed issues that are related to my problem

Description

In order to avoid dockerhub ratelimiting issues, I wanted to change the image being used in setup buildx.

I'm running multi platform builds for my docker images for both amd64 and arm64 architectures.
Each build runs on a Self hosted GitHub Runner with the relevant architecture.

When using the action with a custom image:

- name: Set up Docker Buildx
        id: buildx
        uses: docker/setup-buildx-action@v3
        with:
          platforms: ${{ matrix.platform }}
          driver-opts: |
            image=public.ecr.aws/blinkit/moby/buildkit:v0.13.1

It doesn't always find the image with the following error:

Run docker/setup-buildx-action@v3
Docker info
Buildx version
Inspecting default docker context
Creating a new builder instance
Booting builder
Error: ERROR: Error response from daemon: No such image: public.ecr.aws/blinkit/moby/buildkit:v0.13.1

When fetching the manifest for public.ecr.aws/blinkit/moby/buildkit:v0.13.1 it has both architectures included:

docker manifest inspect public.ecr.aws/blinkit/moby/buildkit:v0.13.1                                                                                (production-eu-cluster-1)
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.oci.image.index.v1+json",
   "manifests": [
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 1054,
         "digest": "sha256:42a35accfe38387e58ec1ac4701ae340223c268c3d849b1c8070f0f62b0eca25",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 1054,
         "digest": "sha256:f91de562e22f9d7e7f15efcbabf61ffcbc44a95b0b87a19b9696d900280448e8",
         "platform": {
            "architecture": "arm",
            "os": "linux",
            "variant": "v7"
         }
      },
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 1054,
         "digest": "sha256:1573eb38e4dc6c72a582ccebea1ddc7b0c4b70bb14b5333ed8cbdb85c19942b7",
         "platform": {
            "architecture": "arm64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 1054,
         "digest": "sha256:798fc4f7c3ead9025b5d14c3f8a2f08a34a693bd0184677f4b4f2f6f6eed7e6d",
         "platform": {
            "architecture": "s390x",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 1054,
         "digest": "sha256:0c8756b6c23c39484ae7ef7bd8f85dc2181a6dbbb5936aafaf5dcbcd1dc76609",
         "platform": {
            "architecture": "ppc64le",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 1054,
         "digest": "sha256:3721978d7e0291ef27ff22aaffaf0097060c84365cd76bcf61f3dfa326cf893c",
         "platform": {
            "architecture": "riscv64",
            "os": "linux"
         }
      },
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 1113,
         "digest": "sha256:821ca4eeed8561ab47c08bff04b1c5ff657912efc4ce36ad90dbe8b05e71f227",
         "platform": {
            "architecture": "unknown",
            "os": "unknown"
         }
      },
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 1113,
         "digest": "sha256:64034e0f70cad95772c36fadd4a1a114fbd6463f041ea0dd3b0880107acdea9c",
         "platform": {
            "architecture": "unknown",
            "os": "unknown"
         }
      },
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 1113,
         "digest": "sha256:c3ef100d291ef8c41f0082ed6468219fd74835677afd4f7072b4357b8c472382",
         "platform": {
            "architecture": "unknown",
            "os": "unknown"
         }
      },
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 1113,
         "digest": "sha256:d7ee33af4679e9f3c706aa474cbc9945d839f5ea44f939bf3f8952111079d16c",
         "platform": {
            "architecture": "unknown",
            "os": "unknown"
         }
      },
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 1113,
         "digest": "sha256:88cf103b4a83ba07a92fa444397ad393c116fab8a29364b540bc6edd8839dcef",
         "platform": {
            "architecture": "unknown",
            "os": "unknown"
         }
      },
      {
         "mediaType": "application/vnd.oci.image.manifest.v1+json",
         "size": 1113,
         "digest": "sha256:d5b7d4ae1d989a056921aa81145e118ada1d1b55331fc1855c64de4988587b41",
         "platform": {
            "architecture": "unknown",
            "os": "unknown"
         }
      }
   ]
}

Expected behaviour

When using a custom image it should always find the image if it exists

Actual behaviour

I get the error specific above

Repository URL

No response

Workflow run URL

No response

YAML workflow

- name: Set up Docker Buildx
  uses: docker/setup-buildx-action@v3
  with:
    platforms: ${{ matrix.platform }}
    driver-opts: |
      image=public.ecr.aws/blinkit/moby/buildkit:v0.13.1

Workflow logs

Run docker/setup-buildx-action@v3
Docker info
Buildx version
Inspecting default docker context
Creating a new builder instance
Booting builder
Error: ERROR: Error response from daemon: No such image: public.ecr.aws/blinkit/moby/buildkit:v0.13.1

BuildKit logs


Additional info

No response

@stavbernazport stavbernazport changed the title booting building with custom image fails randomly with "No such image" error Running action with custom image fails randomly with "No such image" error Dec 11, 2024
@crazy-max
Copy link
Member

Can you add these steps right before the - name: Set up Docker Buildx:

- name: Inspect buildkit image
  run: docker buildx imagetools inspect public.ecr.aws/blinkit/moby/buildkit:v0.13.1
- name: Pull buildkit image
  run: docker pull public.ecr.aws/blinkit/moby/buildkit:v0.13.1

And post your Workflow logs please?

@stavbernazport
Copy link
Author

stavbernazport commented Dec 11, 2024

Hi @crazy-max, thanks for your response.
I added the error to the workflow logs as well.

Posting all of the log is problematic since it might have some sensitive information. I'll do my best to get more if necessary.

The main issue is that it's inconsistent, sometimes the pull succeeds and sometimes it doesn't.

I'll also try what you asked and update 🙏

@crazy-max
Copy link
Member

"Docker info" and other grouped logs seems empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants