-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate layer for snapshot dependencies in quarkus-container-image-jib #14347
Comments
/cc @geoand |
This is a really good idea |
@aloubyansky is there a way we can know from the |
Shouldn't we put all snapshot dependencies in a separate layer, whether they're part of the project or not? They are moving targets anyway. |
That's a good idea as well - and part of a second enhancement |
Oh, I thought it would be easier given you asked how to differentiate them :). |
Now that I started to implement it, you are right :) |
…tainer-image with Jib This is only done for the fast-jar for the time being because: 1) This is an optimization, not a different feature set 2) fast-jar is going to be the default soon Fixes: quarkusio#14347
yes |
Move snapshot dependencies to another layer when using creating a container-image with Jib
Well, that was fast. Thanks guys. |
Keep in mind that for the time being what you requested will only work when the version of your project (and therefore the dependencies) use the SNAPSHOT in their version. This restriction might be lifted in later revisions of the code |
Description
I have a multi-module Maven project where a Quarkus application declares snapshot dependencies to the other modules. Currently
quarkus-container-image-jib
lumps all jar files intarget/lib
together into a single Docker image layer, including the snapshot jars of my dependent modules. This makes the Docker images much less efficient than what they could be because there is 50 MB of never changing content and a few hundred kilobytes of always changing content in one layer.As a workaround I attempted to make my snapshot builds reproducible using
reproducible-build-maven-plugin
, but this effort failed becausejandex-maven-plugin
does not generate reproducible results. Somebody wanted to make jandex builds reproducible, but that effort seems to be on hold.Implementation ideas
quarkus-container-image-jib
should generate a separate layer for jars that haveSNAPSHOT
in their name. The layer would be directly on top of the dependent libraries layer.References
Adjacent discussion at #9818.
The text was updated successfully, but these errors were encountered: