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

unify multi-arch tags #566

Merged
merged 1 commit into from Jun 9, 2021
Merged

unify multi-arch tags #566

merged 1 commit into from Jun 9, 2021

Conversation

Capitrium
Copy link
Contributor

This PR extends the automated DockerHub builds to produce a multi-arch image / manifest list in addition to the base per-architecture images by using manifest-tool (based on this example) to create the manifest list instead of docker manifest, which is still unsupported in DockerHub builds.

These changes should be compatible with the existing DockerHub build settings, but note that both the amd64 and arm64 images must be available on DockerHub in order for manifest-tool to create the manifest list, so only the last architecture-specific build will be marked as Successful in the build history.

Fixes #524.

Signed-off-by: Zack Brenton <zack@imposium.com>
@Capitrium Capitrium mentioned this pull request Jun 8, 2021
@cosmo0920
Copy link
Contributor

I'm not familiar with multiarch image on DockerHub with manifest tool.
I understand that this PR can publish multiarch images but how do we set up building rules on DockerHub?
Current building rules are separated x86_64 and aarch64 images:
スクリーンショット 2021-06-09 10 53 51

@Capitrium
Copy link
Contributor Author

@cosmo0920 There aren't any new building rules that need to be set up on DockerHub using this method. It basically appends the manifest-tool push command to the end of both the existing x86 and aarch64 build post-push hooks; so docker tag && docker push will still run, but manifest-tool push will fail until both the x86 and aarch64 builds have been run (so the manifests that manifest-tool is referencing are pushed to DockerHub). This is also noted in the readme of the example repo here:

No build rule for the (multi-arch) image tag in the manifest, e.g. latest
...
Note that the builds may fail at the beginning until each build rule ran once. This can be because the manifest references
images that don't exist yet. Hence, after running all of them, each referenced image exists and the manifest can be pushed
succesfully.

I'm not actually familiar with manifest-tool either, or with builds on DockerHub, I'm just working off their documentation and the example in the ckulka/docker-multi-arch-example repo. 😆 😅

@cosmo0920
Copy link
Contributor

Hmm..., it's interesting.
Then I'll merge this PR and will revert if we got an issue by this change.

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

Successfully merging this pull request may close these issues.

Unify multi-arch tags
2 participants