summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2022-05-13 22:27:08 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2022-05-13 22:27:08 +0200
commit776cee3d1553bd42a21a1aa69adb81fd8d6aebfb (patch)
tree8a44896d1352da58bb4bda21ba0cf4f839690427
parenta9074952662c7d71df98ddc0a7e4f7e33c29b4bc (diff)
openjdk-runtime: Ship ALL-MODULE-PATH by default.
Change-Id: If73e0e71b93a0f3d77a9a827447e5ee461fc9030
-rw-r--r--openjdk-runtime/Dockerfile2
-rw-r--r--openjdk-runtime/README.adoc14
2 files changed, 7 insertions, 9 deletions
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 @@ ADD jdk-dist/latest.tar.gz /jdk
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://jdk.java.net[jdk.java.net] on top of a
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 @@ docker build -t $IMAGE_NAME .
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