-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve docs on "emulated" vs "native" multi-arch builds #1510
Comments
Would be great if it was possible to have an 'official' way of building and pushing multiarch images via docker/build-push-action github action so that the workaround to avoid the quemu performance penalty mentioned in docker/build-push-action#755 (comment) is not needed |
FWIW since this issue was opened, the page has received an update that better communicates several strategies and their pros/cons (within their respective sections). The first strategy QEMU, highlights ease of use while raising awareness of performance concerns, and encouraging cross-compilation strategy if viable. The Native builder nodes section also highlights its performance advantage (additionally linking to advice for distributing a build to multiple CI runners with Github Actions). Related, for Github Actions the multi-platform CI example has since moved to its own page and has received two new examples:
Those are a little messy and could maybe benefit from some revision in future, but big improvement 👍
Does the above resolve your concern? Without native runners to distribute a build to, you'll still hit a qemu performance penalty.
If you'd like something in-between those twoI have been using Github Actions reusable workflows to separate build and publish responsibilities.
That's not the greatest example, and I still need to get around to updating the cache approach to also support the ARM64 build (likely via the GH cache feature that was brand new at the time). I just wanted to illustrate another approach that is very similar to the distributed example with digests, except instead:
It could definitely be simplified (and not split build + publish, using an expression to enable I'm not quite sure how much the digest upload/download example uses bandwidth wise. I assume that's lightweight vs the cache approach, so my approach may be less efficient but maybe more flexible (nothing gets pushed to a registry until the final step too, useful for local image testing with the same reusable workflow). I'm working on a revision of this approach, so let me know if it'd interest you and I'll share it once I'm done 👍 |
as @polarathene said, we've had multiple revisions of this page since this issue was originally created, and I think it now better answers the pros and cons about the different multi-platform strategies (among other things). So I'm closing this issue as done, feel free to raise a new issue if you would like to see additional improvements. |
Looking at the https://docs.docker.com/build/building/multi-platform/ page, we describe how multi-arch images are built with (container)builders. As there's advantages / disadvantages on using QEMU emulation and native builders (QEMU easier to set up, but at a performance penalty, and it's a "best effort"), perhaps we should have a section outlining the pros/cons of
Relates to the commend posted by @jedevc in #1507 (comment)
/cc @dvdksn
The text was updated successfully, but these errors were encountered: