Support building multiarch images with remote workers.
Currently in docker, remote hosts can be used with buildx to build multiarch images. This is a huge saving in time, as it distributes work over build hosts, but also they are running native arches rather than qemu emulation.
However, podman and buildah both lack this ability.
podman/buildah should be able to:
- Connect to remote hosts
- Automatically select native hosts for builds when the requested platform arch matches.
For example on docker you can do:
DOCKER_HOST=tcp://x.x.x.x:2376 docker buildx create --name cluster
DOCKER_HOST=tcp://x.x.x.x:2376 docker buildx create --name cluster --append
Which would create a cluster with two hosts.
Then we can use that with:
docker buildx use cluster
docker buildx inspect --bootstrap
And inspecting the cluster will show:
Name: cluster
Driver: docker-container
Nodes:
Name: cluster0
Endpoint: tcp://...
Status: running
Platforms: linux/amd64, linux/386
Name: cluster1
Endpoint: tcp://...
Status: running
Platforms: linux/arm64, linux/arm/v7, linux/arm/v6
And then a build such as:
docker buildx build --push --platform linux/amd64,linux/arm64 -f Dockerfile -t <tag> .
Is distributed to the hosts and run on their native architecture, and at the conclusion of the build the issuing podman host imports the images, automatically tags, and can push a multi-arch manifest.
That sounds like podman's farm build functionality.
Interesting - I spent hours searching, and reading podman man pages and never found a single reference to this. Perhaps this can be considered as a bug to improve visibility of podman farm in other areas of the documentation so that people find it?
A friendly reminder that this issue had no activity for 30 days.