Separate layer for snapshot dependencies in quarkus-container-image-jib
See original GitHub issueDescription
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 in target/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 because jandex-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 have SNAPSHOT
in their name. The layer would be directly on top of the dependent libraries layer.
References
Adjacent discussion at #9818.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (9 by maintainers)
yes
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