Hacker News new | ask | show | jobs
by mdaniel 300 days ago
I'd suspect a great deal of people are secretly benefiting from qemu when they do $(docker build --platform linux/{arm64,amd64}) courtesy of binfmt_misc and a static copy of qemu

- https://github.com/moby/buildkit/blob/v0.23.2/docs/multi-pla...

- https://github.com/moby/buildkit/blob/v0.23.2/Dockerfile#L16...

- https://github.com/tonistiigi/binfmt/blob/buildkit/v9.2.2-54...

- https://github.com/tonistiigi/binfmt/blob/buildkit/v9.2.2-54... and https://github.com/tonistiigi/binfmt/blob/buildkit/v9.2.2-54...

and let me tell you from first-hand experience, that trying to swap in an updated version of the bundled qemu binary when the static version panics on some mis-emulated instruction is some whooooooo, boy

1 comments

Then again, everything in buildkit is designed for maximum opacity, in my experience so I guess it tracks