openjdk-runtime: Ship ALL-MODULE-PATH by default.
Change-Id: If73e0e71b93a0f3d77a9a827447e5ee461fc9030
diff --git a/openjdk-runtime/Dockerfile b/openjdk-runtime/Dockerfile
index ad41771..80d5b05 100644
--- a/openjdk-runtime/Dockerfile
+++ b/openjdk-runtime/Dockerfile
@@ -11,7 +11,7 @@
RUN microdnf --assumeyes --nodocs install binutils
RUN /jdk/*/bin/jlink \
-J-XX:MaxRAMPercentage=75 \
- --add-modules java.base,java.instrument,java.naming,java.rmi,java.scripting,java.security.jgss,java.security.sasl,java.sql,jdk.compiler,jdk.jconsole,jdk.unsupported \
+ --add-modules ALL-MODULE-PATH \
--compress=1 \
--no-man-pages \
--strip-debug \
diff --git a/openjdk-runtime/README.adoc b/openjdk-runtime/README.adoc
index 8687266..9cd942d 100644
--- a/openjdk-runtime/README.adoc
+++ b/openjdk-runtime/README.adoc
@@ -26,10 +26,7 @@
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/building_running_and_managing_containers/assembly_types-of-container-images_building-running-and-managing-containers#con_understanding-the-ubi-micro-images_assembly_types-of-container-images[Red
Hat UBI Micro] base.
-The module set was selected for
-https://gerrit.benkard.de/plugins/gitiles/mulkcms2/[MulkCMS 2], which
-is a typical Quarkus application. It will very likely work for other
-typical Quarkus applications.
+By default the image contains all modules shipped with OpenJDK.
== Building
@@ -45,20 +42,21 @@
You may want to customize the module set included in the JDK.
-For example, specifying `ALL-MODULE-PATH` includes all modules
-included in the OpenJDK distribution:
+For example, say all you need are `java.base` and `java.naming`, then
+the following excludes everything else contained in the OpenJDK
+distribution:
[source,dockerfile]
----
RUN /jdk/*/bin/jlink \
-J-XX:MaxRAMPercentage=75 \
- --add-modules ALL-MODULE-PATH \ #<1>
+ --add-modules java.base,java.naming \ #<1>
--compress=1 \
--no-man-pages \
--strip-debug \
--output /java
----
-<1> Include all JDK modules.
+<1> Include the JDK modules that you need.
== Usage