Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: reduce
phylum
binary size for slim images (#385)
This change uses `strip` to reduce the `phylum` binary size. This idea comes from a blog post about making Rust release binaries smaller: https://kobzol.github.io/rust/cargo/2024/01/23/making-rust-binaries-smaller-by-default.html Instead of making the change in the release workflow of the Phylum CLI, the binary stripping is limited to the `slim` Docker images here in an effort to reduce the size for performance-oriented applications. The benefit is a smaller image and therefore faster download times. Benchmarks from this change on my local system: * Image generation duration increased by a few seconds * This is due to installing and then removing the `binutils` package * The `phylum` binary size went from 124MB --> 90MB * Uncompressed image size went from 380MB --> 344MB * Compressed image size went from 126.66MB --> 116.96MB
- Loading branch information