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
publish a multi-platform container image #4
Comments
here's one way to do this:
|
Taking that a step further @scareything, I see two approaches with different implications for the consumer projects' build scripts.
These have the same outcome: fast builds when the target arch matches the host arch. The main differences are whether script complexity is offloaded to Ziti projects' respective build scripts (run the image for the target arch) or offloaded to the Dockerfile that must have switching logic to install the right cross-compile utilities and libraries for each cross-builder variant. I'm leaning toward a simpler Dockerfile, one for each target architecture, and a pattern of build scripts in each Ziti project that runs the appropriate image based on the CMake preset's target architecture, e.g., |
We rely on (slow) emulation if we use |
I'm assuming the container runtime will not emulate when the |
Support macOS M1 and other arm64 users better by accelerating local builds with a multi-platform container image.
Expand the
ziti-cmake
image's Dockerfile to take advantage of BuildKit multi-platform features.The Dockerfile should continue to configure Debian multi-arch in the image, but should switch to install the correct cross-compile tools for each target architecture. Presently, the image treats amd64 as native and arm, arm64 as cross-builds. The new image will treat the target architecture as native, and also install the cross-compile tools for the others.
The text was updated successfully, but these errors were encountered: