slim icon indicating copy to clipboard operation
slim copied to clipboard

feat(builder): use docker-buildx plugin to build for non-native platforms

Open estroz opened this issue 2 years ago • 5 comments

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

estroz avatar Apr 19 '22 17:04 estroz

👇 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

    Try it now!

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

ghost avatar Apr 19 '22 17:04 ghost

@estroz will this get merged? That's a big PR - would be a shame to leave it and let it have more conflicts 😉

sharq1 avatar Jun 10 '22 05:06 sharq1

any changes ? Still issues on M1 builds

gthomson31 avatar Feb 17 '23 15:02 gthomson31

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.

kcq avatar Feb 17 '23 20:02 kcq

Thank you for the quick response will give that a try out

gthomson31 avatar Feb 17 '23 21:02 gthomson31