WIP: chore: use ko instead of docker to minimize the image size#53
WIP: chore: use ko instead of docker to minimize the image size#53developer-guy wants to merge 1 commit into
Conversation
|
Can you help me understand the advantage here? Our image already just contains the single spiffe-csi-driver binary. How big is the image size reduction and where is it coming from? |
|
Are we still interested in figuring out what our benefit is from this? If not, I will close it. |
|
ah sorry, I forgot that ☝️ This is not a multi-stage build, this is the reason why I do this TBH, as it uses the go image for the final image, which makes it quite heavy for the run-time, and it causes to increase in the time while loading it into the kind node itself, ko will take care of everything for us for free, it uses distroless base image, and it includes only the binary it builds. does that make sense? PTAL @imjasonh |
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
This is not the case. The Dockerfile uses a multi-stage build. The final produced image uses |
That's great to hear! Minimal images are definitely a good practice, and they don't get much more minimal than I think there could still be a benefit to using Some of the benefits of
If those sound worth exploring, let me know. If you'd prefer to stick with Dockerfiles, that's fine too. Thanks for starting this conversation @developer-guy 😄 |
Signed-off-by: Batuhan Apaydın batuhan.apaydin@trendyol.com
It requires ko => v0.12.0 to use the
--bareoption with the local daemon.ko-build/ko#820