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

Building on multiple native nodes #58

Closed
ndench opened this issue Feb 7, 2022 · 6 comments
Closed

Building on multiple native nodes #58

ndench opened this issue Feb 7, 2022 · 6 comments

Comments

@ndench
Copy link

ndench commented Feb 7, 2022

This a great, github action. Makes it super easy to get all our required docker images built and published in CI.

Is it possible to support building across multiple native nodes? When building our images for both linux/arm64 and linux/amd64 using QEMU, the build takes 60 minutes in CI. By splitting the build to run on two separate native nodes the build time is reduced to 15 minutes.

The only problem with this approach is that both builds push their own manifest separately instead of a combined one at the end. So the latest pushed image only knows of a single platform.

@fzipi
Copy link

fzipi commented Mar 27, 2022

I started with the multi node approach, but then separated manifest is a no deal.

@ndench
Copy link
Author

ndench commented Mar 28, 2022

I agree, it makes multi node builds unusable. I was hoping there's some way of building multiple nodes and generating the manifest at the end.

@fzipi
Copy link

fzipi commented Mar 28, 2022

🤔 Looks like this thecnique can be adapted for doing it.

@schmunk42
Copy link

Is there a way to do this with bake-action now?

@crazy-max
Copy link
Member

crazy-max commented Jun 9, 2023

See https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners to distribute build across multiple runners. To use this example with bake you can look at crazy-max/docker-osxcross#24

Best is ofc to use a builder with native nodes against the platform you want to build: https://docs.docker.com/build/ci/github-actions/configure-builder/#append-additional-nodes-to-the-builder. Example here: https://github.com/docker/packaging/blob/2c95ad0ca93ea91a01755b01e9a979adec955540/.github/workflows/.release.yml#L62-L89

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

No branches or pull requests

4 participants