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

Using registry mirrors was broken with v3.1 #163

Open
3 tasks done
tedivm opened this issue Sep 16, 2024 · 3 comments
Open
3 tasks done

Using registry mirrors was broken with v3.1 #163

tedivm opened this issue Sep 16, 2024 · 3 comments

Comments

@tedivm
Copy link

tedivm commented Sep 16, 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

Starting in v3.1, which released the PR for #151, you've hardcoded the image registry to docker.io on the image itself.

This breaks everyone who is using an registry mirror, because it forces people to use your registry specifically while ignoring the possibility someone might want to use a mirror. This is even more critical because you've introduced rate limits to your registry.

The solution to #151 is not to force every user onto your registry, but to provide documentation for the REGISTRY_HOST environment variable so people can switch to it when they want.

Expected behaviour

If I'm using a registry mirror I want to actually use that mirror.

Actual behaviour

Instead of using our mirror we're being forced to the docker.io, which means we're being rate limited. This in turn means the action is breaking our pipelines.

Repository URL

No response

Workflow run URL

No response

YAML workflow

name: Container Build and Publish
run-name: Build and Push Docker Image
on:
  workflow_dispatch:
  pull_request:
  push:
    branches:
      - main
  release:


jobs:
  Build-and-Push:
    steps:
      # This step should use the configured mirror in our runners, but doesn't.
      - name: Set up QEMU
        uses: docker/[email protected]

Workflow logs

No response

BuildKit logs

Pulling binfmt Docker image
  /usr/bin/docker pull docker.io/tonistiigi/binfmt:latest
  Error response from daemon: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
Error: Error response from daemon: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit

Additional info

No response

@tedivm
Copy link
Author

tedivm commented Sep 16, 2024

Note that setting the version to v3.0.0 resolves the issue, but anyone who sets it to v3 gets the currently broken action.

@crazy-max
Copy link
Member

crazy-max commented Sep 16, 2024

The solution to #151 is not to force every user onto your registry,

It doesn't force anyone, docker.io is the canonical reference for Docker's public registry where this image is effectively hosted. So, with the image reference docker.io/tonistiigi/binfmt:latest or tonistiigi/binfmt:latest, Docker will look for the image on Docker Hub or its configured mirror. If that's not the case then it might be a bug on moby.

Just to make sure, does it work with this?:

      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v3
        with:
          image: tonistiigi/binfmt:latest

but to provide documentation for the REGISTRY_HOST environment variable so people can switch to it when they want.

Where do you see REGISTRY_HOST documented? Can't find anything on my side.

@tobitege
Copy link

tobitege commented Sep 27, 2024

with:
          image: tonistiigi/binfmt:latest

I just tried this "with ... image" and it seems to resolve the issue I've been experiencing like poster mentioned in #168 .

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

3 participants