Skip to content
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

Use GitHub's Linux arm64 hosted runners to build arm64 Docker image #509

Open
garrettjstevens opened this issue Jan 21, 2025 · 0 comments
Open

Comments

@garrettjstevens
Copy link
Contributor

We currently build Docker images using the linux/arm64/v8 and linux/amd64 platforms, along with QEMU to emulate the arm64 platform. This takes about 50 minutes, most of which is spent building the emulated images.

GitHub recently announced general availability of their Linux arm64 hosted runners for GitHub Actions: https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/

We can use this to speed up our build time quite a bit by building the arm64 image separately on an arm64 machine. There is an example of building across multiple runners here: https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners. This runs the arm64 and amd64 builds in parallel and then uses a merge job to combine them into a single published tag.

Instead of using a platform matrix, we'd use an os matrix, like this example: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow#example-using-a-multi-dimension-matrix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant