Jigsaw and containers

Alan Bateman Alan.Bateman at oracle.com
Thu Aug 31 18:35:15 UTC 2017


On 31/08/2017 18:58, Daniel Latrémolière wrote:
> I have a problem to understand new layout of files in JRE/JDK images 
> for the containers use-cases.
>
> Containers (Docker, Flatpak) have a notion of single inheritance, 
> where an union FS merge the images of the container with parent 
> containers. This give much smaller images of containers when most of 
> the files are untouched and inherited from a common parent container.
>
> The layout of JRE/JDK images, with one big file "/lib/modules" taking 
> most of the size, seems to be completely anti-modular and particularly 
> bad for fast redeployment. Isn't it more modular and space-efficient 
> to have not a file "/lib/modules" but a directory "/lib/modules/" 
> where all available files, like "0", "1", etc. would be loaded.
>
> By example, an application suite can have a parent container with the 
> Java standard library and common libraries of the application suite 
> (creating a file "lib/modules/0" with the set of common modules). Each 
> application would be a container inheriting common code from parent 
> and with a file "lib/modules/1" with the own set of modules for the 
> application.
>
Are you using `jlink` to create a run-time image for each application? 
(just trying to establish if you are actually running into an issue or not).

-Alan



More information about the jigsaw-dev mailing list