slim
slim copied to clipboard
feat(builder): use docker-buildx plugin to build for non-native platforms
Fixes #312
Supersedes #314 , which adds ~14 MB to the binary and a few new deps while this only adds ~3 MB and one new dep.
What
Leverage docker buildx
for multi-platform output image builds
Why
See #312
How Tested
Manually
👇 Click on the image for a new way to code review
-
Make big changes easier — review code in small groups of related files
-
Know where to start — see the whole change at a glance
-
Take a code tour — explore the change with an interactive tour
-
Make comments and review — all fully sync’ed with github
Legend
@estroz will this get merged? That's a big PR - would be a shame to leave it and let it have more conflicts 😉
any changes ? Still issues on M1 builds
Still issues on M1 builds @gthomson31 until we have this fully integrated try using the
--image-build-engine
and potentially--image-build-arch
flags. With--image-build-engine=internal
Slim will build the output image without using Docker, which might handle the same use case here (building optimized images on non-native platforms). If the target image's architecture isn't picked up properly the--image-build-arch
flag should allow you to set it explicitly.
Thank you for the quick response will give that a try out