Switch to multi-stage build#70
Merged
roshkhatri merged 2 commits intovalkey-io:mainlinefrom May 27, 2025
Merged
Conversation
1572414 to
89ff8a7
Compare
This simplifies the build pipeline, as no "cleanup" stage has to be done, and allow precise description of the runtime libraries required to use Valkey. The result reduces Debian (uncompressed) image size from 140MB to 116MB (a 17% improvement), and allow certain tools like wget to be removed from the build by using native `ADD` instructions. The number of vulnerabilities (as reported by trivy) in the Debian image also drops from 693 to 77, where the main contributors are left-over build dependencies. The Alpine image did not see any improvement, however. Signed-off-by: Leorize <[email protected]>
89ff8a7 to
37f2cb0
Compare
Member
|
Hey @alaviss can you please take a look at the failure? I see that these workflow do not run on your fork. |
* dirCommit now skip `COPY` lines with `--from`, since they are files copied from other containers and not the repository. * `FROM` processors will now only process tagged references that does not point to the current image. Signed-off-by: Leorize <[email protected]>
dfe75c0 to
0586ccf
Compare
Contributor
Author
|
stackbrew-library generator needed some small patches to handle |
Contributor
Author
|
I don't think musl-libc supports ifunc, so valkey-io/valkey#2099 might have broken unstable on alpine. |
Contributor
Author
|
valkey-io/valkey#2133 has been merged so alpine CI should pass now, please re-run. |
|
Great PR. When can it be merged, and could we have a simpler template generator? It is very hard to read the template generator and this PR |
roshkhatri
approved these changes
May 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This simplifies the build pipeline, as no "cleanup" stage has to be done, and allow precise description of the runtime libraries required to use Valkey.
The result reduces Debian (uncompressed) image size from 140MB to 116MB (a 17% improvement), and allow certain tools like wget to be removed from the build by using native
ADDinstructions. The number of vulnerabilities (as reported by trivy) in the Debian image also drops from 693 to 77, where the main contributors are left-over build dependencies.The Alpine image did not see any noticeable improvement, however
Closes #57.