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?
Asked
Active
Viewed 4,961 times
11

chingis
- 1,514
- 2
- 19
- 38
1 Answers
6
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/

BMitch
- 231,797
- 42
- 475
- 450
-
Do you mean I need to have different repos for multiple architectures, kinda like official images use https://hub.docker.com/r/arm64v8 and so on? – chingis Feb 23 '21 at 16:54
-
1@chingis I said different tags. If you want to use different repos, that's your call. – BMitch Feb 23 '21 at 17:44