chingis
chingis

Reputation: 1790

Is it possible to push docker images for different architectures separately?

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?

Upvotes: 18

Views: 10170

Answers (1)

BMitch
BMitch

Reputation: 265045

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/

Upvotes: 14

Related Questions