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

question: why build arm tags separately? #121

Open
aleksasiriski opened this issue Nov 27, 2024 · 4 comments
Open

question: why build arm tags separately? #121

aleksasiriski opened this issue Nov 27, 2024 · 4 comments
Labels
question Further information is requested

Comments

@aleksasiriski
Copy link
Contributor

Description of the bug

Please combine your docker images into a multi-arch, instead of using a separate tag for arm64. This makes using K8s with hybrid arch cluster much harded to deploy your app to.

Steps To Reproduce

.

Additional Information

No response

@aleksasiriski aleksasiriski added the bug Something isn't working label Nov 27, 2024
@dan-online dan-online changed the title bug: Why build arm tags separately? question: why build arm tags separately? Nov 27, 2024
@dan-online
Copy link
Owner

Hey @aleksasiriski building the binaries for each image happens separately and the file to add changes per-image. This makes it a bit hard to build the image multi-arch. I haven't researched it too much so maybe there's a way to combine two images... nonetheless I'll keep this in mind if I have some time although I'm always happy to check out a pull-request

@aleksasiriski
Copy link
Contributor Author

It should be possible to combine multiple built images into a single docker manifest, that's the standard way I believe. You still push images separately and then after everything push a manifest that combines all the images into one main tag that serves to provide the correct arch for the user pulling it.

So instead of pushing amd64 to latest, latest-postgres and latest-sqlite you instead push it to latest-amd64, latest-postgres-amd64 and latest-sqlite-amd64 the same way you do currently for arm64. After that, you would create a docker manifest with the correct arches pinned and push that as latest.

@dan-online
Copy link
Owner

Do you perhaps know the merits of having the amd64/arm64 individual tags? If they're not needed then just having the merged tags would be best and reduce unused clutter

@aleksasiriski
Copy link
Contributor Author

I believe you still need to have them, as you can't magically push a multiarch tag. Maybe I'm mistaken, since I didn't put much time into how docker does this.

A good use case for having the separate tags present alongside the multiarch one would be if someone wants to target a specific arch that is different from their own, either for building images or something else. Not sure if you can achieve this with a multiarch tag (requesting arm64 image on a x86 system).

@dan-online dan-online added question Further information is requested and removed bug Something isn't working labels Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants