Hacker News new | ask | show | jobs
by kelvie 1525 days ago
Anyone know if podman has an equivalent to `docker buildx` yet? Right now I use docker a lot to build arm images to deploy on e.g. Raspberry Pis.
5 comments

You have to explicitly invoke buildah bud with --arch and --manifest. You can then push the manifest with podman. There is slightly less magic, which is a HUGE advantage if you operate outside of the hairline Docker happy path.
I know this isn’t applicable to every use case but I recently went down the rabbit hole of cross compiling for the Pi using buildx and in my case I was able to use their 64 bit OS which was released to the general public back in Feb of this year. That one takes arm64 images no problem. Obviously no Pi’s before 2016 can use this but it solves a lot of difficulties if you aren’t absolutely requiring a cross compile and an arm64 image is available.
I keep hearing that buildx is a next-gen build tool, but I can't find what exactly it does. What features does it add over the classic `docker build` command?
I am also unsure how buildx works, however I do know that the official docker build-and-push action is not compatible with podman (despite the podman-docker pkg), solely because it uses buildx. As well, compared to buildah builds, building with buildx is much faster--at least with default flags for buildah-build-and-push vs docker-build-and-push. I can say that buildx has an additional cache that must be cleared overtime, which might be related to the build speed difference.
If buildx is build kit then there's a good amount of granular caching involved, as well as the ability to build in parallel.
I use it to build x86 images on my M1 MacBook
There is "podman buildx build …" which sounds like what you are searching for?
Somewhat related, do all registries support pushing multi arch builds? DockerHub works, but I can't get it to work with GitHub registries.
I've managed to push amd64/arm64 images to GitHub a while ago, but I was still using Docker proper at the time, so the registry itself should support this.