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

Fix Docker metadata labels in prebuilt images #91

Open
bradlarsen opened this issue Oct 19, 2023 · 4 comments
Open

Fix Docker metadata labels in prebuilt images #91

bradlarsen opened this issue Oct 19, 2023 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed packaging Related to packaging and distribution

Comments

@bradlarsen
Copy link
Collaborator

The prebuilt Docker images for releases do not include all the metadata one would like. See here, for example: https://github.com/praetorian-inc/noseyparker/pkgs/container/noseyparker/137062442?tag=v0.15.0. No labels!

image
@bradlarsen bradlarsen added bug Something isn't working packaging Related to packaging and distribution labels Oct 19, 2023
@munntjlx
Copy link
Contributor

You could also include a sha512 sum of the image as a label, version, etc.?

@bradlarsen bradlarsen reopened this Nov 2, 2023
@bradlarsen
Copy link
Collaborator Author

I thought I had fixed this issue in c43334c, but it turns out I did not. I manually re-ran the Release Artifacts workflow, and its multi-architecture Docker image still comes out with missing labels!

It sounds like this is a bug or limitation in the build-push-action, specifically with regard to multi-architecture images: docker/build-push-action#846 (comment)

In another project, they worked around this by manually merging the single-architecture Docker image manifests: dbschenker/vaultpal#31

Fixing this deficiency in Nosey Parker will require some more work, probably a manual merge of manifests. It may make sense anyway to manually merge single-architecture Docker images, as the overall Docker workflow could be drastically sped up that way (instead of using qemu to build the ARM64 image, we could use the new M1 macOS runner, avoiding slow binary translation). See docker/build-push-action#846 for inspiration.

@munntjlx
Copy link
Contributor

munntjlx commented Nov 2, 2023

A "fast" way to build a multi arch docker image that I found easier, is simply to use the 2 different build aka x86_64 and arm64 and then just 'publish' to the same container image repo. It should 'just work'. Havent' tried this with non docker repos though!

@munntjlx
Copy link
Contributor

munntjlx commented Nov 2, 2023

Be sure to use the same tag!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed packaging Related to packaging and distribution
Projects
None yet
Development

No branches or pull requests

2 participants