Update a runtime image
Gunnar Morling
gunnar at hibernate.org
Wed Jan 10 17:39:42 UTC 2018
2018-01-10 16:28 GMT+01:00 Alan Bateman <Alan.Bateman at oracle.com>:
> On 10/01/2018 10:32, Gunnar Morling wrote:
>
>> Hi Thomas,
>>
>> What I've found helpful is the ability to amend or override the set of
>> modules contained in a modular runtime image via --module-path and
>> --upgrade-module-path.
>>
>> If you use (Docker) containers to deploy your app, this can be employed
>> nicely to separate images with your app's dependencies (as a modular
>> runtime image) and a very thin image with your app itself. Unless your
>> dependencies change, only the latter one needs to be re-built and
>> distributed. The "exclude-resources" plug-in comes in handy for omitting
>> your app from the modular runtime image. I've written about it here:
>> https://github.com/moditect/moditect/wiki/Creating-dependency-images.
>>
>> If I understand this correctly then the app module is linked into the
> run-time image to force its dependences to be linked in. It might be saner
> to just get its list of `requires` and specify that list to jlink. That way
> the app module can be specified on the module path (you are otherwise
> forced to use the upgrade module path to avoid the broken app module in the
> run-time image).
What exactly do you mean by "broken app module"? It was my understanding
that by applying that exclusion pattern, no trace whatsoever of the app
module would end up in the resulting runtime image. If I run
<IMAGE>/bin/java --list-modules it's not shown in the image's module list,
and things works for me when I add it via --module-path.
But either what you suggest might be cleaner indeed.
>
>
> -Alan
>
More information about the jigsaw-dev
mailing list