Re:GitHub Linux ARM64 hosted runners now available for free ...
by jhardy54 on Friday January 17, 2025 @12:14AM
(#42734320)
Does build-push-action solve this? I haven’t used their multi-arch configs but I was under the impression that it was pretty smooth.
Re:GitHub Linux ARM64 hosted runners now available for free ...
by trumpvoter on Friday January 17, 2025 @05:40AM
(#42736126)
It runs in a single job, where single job = single runner. To use two runners/jobs to build multiplatform, each will need to push an untagged image and the shas are aggregated into a manifest in a third job. Definitely doable and the recipes will come out.
Personally prefer just using Go/ko whenever possible ;)
* Configure a workflow with 1 job for each arch, each building a standalone single-arch image, tagging it with a unique tag, and pushing each to your registry
* Configure another job which runs at the completion of the previous jobs that creates a combined manifest containing each image using `docker manifest create`.
Basically, doing the steps listed in https://www.docker.com/blog/multi-arch-build-and-images-the-... under "The hard way with docker manifest ".
Does anyone have a better approach, or some reusable workflows/GHA that make this process simpler? I know about Depot.dev which basically abstracts the runners away and handles all of this for you, but I don't see a good way to do this yourself without GitHub offering some better abstraction for building docker images.
Edit: I just noticed https://news.ycombinator.com/item?id=42729529 which has a great example of exactly these steps (and I just realized you can just push the digests, instead of tags too, which is nice).