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

While manually creating a manifest, it errors out multiple repositories currently not supported #1147

Closed
puneet-traceable opened this issue May 30, 2022 · 7 comments

Comments

@puneet-traceable
Copy link

I am trying to build multi-arch image but do not want to do this via qemu as the build become fairly slow if I use qemu.
Since this image building is happening inside github action, I am not able to use buildx builder and connect vm's for different architectures.
So, this is what I ended up doing:

  1. Have runners for both amd64 and arm64
  2. build and publish docker image for amd64 from amd64 runner(ghcr.io/puneet-work/images/gh-img-amd64:1.11.0)
  3. build and publish docker image for arm64 from arm64 runner(ghcr.io/puneet-work/images/gh-img-arm64:1.11.0)
  4. On amd64 runner create a manifest list
    docker buildx imagetools create -t ghcr.io/puneet-work/images/gh-img:1.11.0 --append ghcr.io/puneet-work/images/gh-img-arm64:1.11.0 --append ghcr.io/puneet-work/images/gh-img-amd64:1.11.0
    But this errors out with error
    error: multiple repositories currently not supported, found map[ghcr.io/puneet-work/images/gh-img:{} ghcr.io/puneet-work/images/gh-img-amd64:{} ghcr.io/puneet-work/images/gh-img-arm64:{}]

What would be the best way to achieve this. How does docker buildx build internally does it? And how can replicate the same manually?

@ciaranmcnulty
Copy link

Can you try making them different tags in the same repository?

i.e. ghcr.io/puneet-work/images/gh-img:1.11.0-arm64

@puneet-traceable
Copy link
Author

puneet-traceable commented Jun 3, 2022

@ciaranmcnulty I was specifically trying to keep image name different to avoid confusion.
How does it work when we do multi-arch builds with buildx? I do not see named tags when we do multi-arch build. I only see some digest there. Is there a way to replicate the same behaviour?

@ciaranmcnulty
Copy link

Not sure why the restriction is there TBH, was just trying to interpret the message

My understanding of multi-arch is that the manifest is pushed along with the layers for each (single-arch) image, but no tags are pushed that point directly to the images.

@tonistiigi
Copy link
Member

This feature is being added in #1137

Registry scopes blobs by repo. They need to be uploaded again if the repo changes. If you use same repo and different tags then everything should work today.

@ciaranmcnulty
Copy link

As a suggestion maybe build and push the single-arch images into the main repo with tags that reflect the CI job number (eg :arm-ci-abc123456) to signal they're just there transiently, then either delete them explicitly or set your registry's tag cleanup policy to remove them later

@puneet-traceable
Copy link
Author

puneet-traceable commented Jun 3, 2022

@tonistiigi @ciaranmcnulty Is it possible to delete the single arch tags as the multi-arch manifest is already pointing to these one's?

@jedevc
Copy link
Collaborator

jedevc commented Jun 27, 2023

Feature added in #1137.

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

No branches or pull requests

4 participants