OpenJDK now offers runtime image that contains only what is needed to run Java application and nothing to build it.
This enables to create application image with a smaller size and less susceptible to security issues.
Currently, the Helm Chart for WildFly do not leverage this runtime image and create the application image from the OpenJDK S2I builder image (which contains eg Maven in addition to the Java runtime).
It should be possible for a Bootable Jar user to specify that the application image should be built from the OpenJDK runtime image.
Describe the solution you'd like
Add a field named build.bootableJar.runtime with a boolean value (false by default).
Add a field named build.bootableJar.runtimeImage with a default value of [registry.access.redhat.com/ubi8/openjdk-11-runtime:latest](http://registry.access.redhat.com/ubi8/openjdk-11-runtime:latest)
When build.bootableJar.runtime is true, create 2 build configs (very similar to the WildFly S2I workflow):
one buildconfig will use the build.bootableJar.builderImage to create the jar
another buildConfig will take that jar and copy it in the build.bootableJar.runtimeImage
When build.bootableJar.runtime is false, the current behaviour is used (the application image is the output of the OpenJDK builder image
OpenJDK now offers runtime image that contains only what is needed to run Java application and nothing to build it. This enables to create application image with a smaller size and less susceptible to security issues.
Currently, the Helm Chart for WildFly do not leverage this runtime image and create the application image from the OpenJDK S2I builder image (which contains eg Maven in addition to the Java runtime).
It should be possible for a Bootable Jar user to specify that the application image should be built from the OpenJDK runtime image.
Describe the solution you'd like
Add a field named
build.bootableJar.runtime
with a boolean value (false
by default). Add a field namedbuild.bootableJar.runtimeImage
with a default value of[registry.access.redhat.com/ubi8/openjdk-11-runtime:latest](http://registry.access.redhat.com/ubi8/openjdk-11-runtime:latest)
build.bootableJar.runtime
istrue
, create 2 build configs (very similar to the WildFly S2I workflow):build.bootableJar.builderImage
to create the jarbuild.bootableJar.runtimeImage
build.bootableJar.runtime
isfalse
, the current behaviour is used (the application image is the output of the OpenJDK builder imageReferences