Hacker News new | past | comments | ask | show | jobs | submit login

Are there more details on "docker buildx build" that you can point us to? The command line reference doesn't seem especially helpful: https://docs.docker.com/engine/reference/commandline/buildx_...

E.g. if I wanted to start building ARM binaries on a x86 host, is that the sort of thing this would enable?




You can build multiplatform images for x86 and ARM (e.g. M1 Mac) like so:

docker buildx build --platform linux/amd64,linux/arm64 .

I constantly use buildx to build x86 images on my M1 so that I can run these images in my x86 Kubernetes cluster.

https://docs.docker.com/buildx/working-with-buildx/


Just to follow up on my own question (though I appreciate the siblings):

I found this article with some overview and example command lines: https://www.docker.com/blog/multi-arch-images/ . As best I can tell, you don't actually need a custom builder. You can just skip the `docker buildx create` and go straight to `docker buildx build` after one workaround below.

I needed the workaround from this comment to make it work (to install qemu? not sure): https://github.com/docker/buildx/issues/495#issuecomment-754...

Overall a very slick experience for going from zero to multiarch containers. Well done, Docker.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: