From what I know docker buildx build --push
will overwrite existing image architectures with the one you specified in --platform
parameter. As I understand you have to build and push for all architectures at the same time when using buildx
. However, I know that official docker images use arm64 build farm to build linux/arm64 images. How is it possible? Do they just use docker push
without buildx
? If so, does it mean docker push
doesn't overwrite existing architectures unlike buildx
? What's the best way to do that if I want to build and push multiple architectures on separate machines?
Is it possible to push docker images for different architectures separately?
Asked Answered
You can build and push with separate commands on different hosts in a cluster, each sending to a different tag. And then after all tags for each platform have been pushed, you can use docker manifest
to create a multiplatform manifest that points to all images with a single tag. This tool currently requires experimental support to be enabled.
Further details on docker manifest
can be found in the docs: https://docs.docker.com/engine/reference/commandline/manifest/
Do you mean I need to have different repos for multiple architectures, kinda like official images use hub.docker.com/r/arm64v8 and so on? –
Jimmie
@Jimmie I said different tags. If you want to use different repos, that's your call. –
Byrnes
© 2022 - 2024 — McMap. All rights reserved.