docker / setup-buildx-action

GitHub Action to set up Docker Buildx
https://github.com/marketplace/actions/docker-setup-buildx
Apache License 2.0
905 stars 142 forks source link

`moby` image: add docker.io container registry #314

Closed Frankkkkk closed 2 months ago

Frankkkkk commented 2 months ago

Hi, In docker, the container registry is supposed to be docker.io, but it can be others or even be undefined in other container runtimes (e.g. podman). Thanks!

Frankkkkk commented 2 months ago

Hi,

I understand your reticence as it could concurrence the Docker product.

However, for the technical reasons: this action is used in GitHub, but also on other forges such as Gitea or Forgejo (they both use act). The runners on these can use other container runtimes, and in this case this action would fail as the registry is not specified.

Thanks, Kind regards

On 12 April 2024 12:18:48 CEST, CrazyMax @.***> wrote:

@crazy-max commented on this pull request.

This is used through Docker, Inc products so this is not necessary outside this scope for other tools such as Podman.

Closing this but let us know if you have a reproducible case. Thanks.

-- Reply to this email directly or view it on GitHub: https://github.com/docker/setup-buildx-action/pull/314#pullrequestreview-1996416621 You are receiving this because you authored the thread.

Message ID: @.***>

crazy-max commented 2 months ago

I understand your reticence as it could concurrence the Docker product.

Internally this image is pulled using the Docker API when executing the docker buildx create command but agree that for another container runtime that doesn't default to Docker Hub it would fail.

Will think about it and come back to you but in the meantime you can still define the image tag yourself using: https://docs.docker.com/build/ci/github-actions/configure-builder/#version-pinning

- name: Set up Docker Buildx
  uses: docker/setup-buildx-action@v3
  with:
    driver-opts: image=docker.io/moby/buildkit:latest

Would also need to align tags on buildx side https://github.com/docker/buildx/blob/df7a3db94712c748766dbf033741987deecc6daa/driver/bkimage/bkimage.go#L4-L5 if we agree with this (cc @tonistiigi @thompson-shaun)