From be1db482aefff6e2531ebb017e1d5da278bca8c5 Mon Sep 17 00:00:00 2001 From: Severin Gehwolf Date: Thu, 19 Oct 2023 19:39:09 +0200 Subject: [PATCH] Update opts in Dockerfiles using ubi8 OpenJDK The semantics of JAVA_OPTS env is that they remove any default tuning from the UBI 8 OpenJDK image. A better suggestion would be to only append the quarkus specific options to the JVM command line. That can be done by using JAVA_OPTS_APPEND instead. Using that over JAVA_OPTS has the added benefit that users specifying JAVA_OPTS_APPEND in a deployment config would see their values show up. They wouldn't see them show up if they added an env JAVA_OPTS_APPEND, since JAVA_OPTS is specified in the Dockerfile (overriding any JAVA_OPTS_APPEND use). --- elasticsearch-quickstart/src/main/docker/Dockerfile.jvm | 2 +- elasticsearch-quickstart/src/main/docker/Dockerfile.legacy-jar | 2 +- getting-started-dev-services/src/main/docker/Dockerfile.jvm | 2 +- .../src/main/docker/Dockerfile.legacy-jar | 2 +- security-webauthn-quickstart/src/main/docker/Dockerfile.jvm | 2 +- .../src/main/docker/Dockerfile.legacy-jar | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/elasticsearch-quickstart/src/main/docker/Dockerfile.jvm b/elasticsearch-quickstart/src/main/docker/Dockerfile.jvm index 8783251616..1b8ca3dc92 100644 --- a/elasticsearch-quickstart/src/main/docker/Dockerfile.jvm +++ b/elasticsearch-quickstart/src/main/docker/Dockerfile.jvm @@ -88,6 +88,6 @@ COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/ EXPOSE 8080 USER 185 -ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" diff --git a/elasticsearch-quickstart/src/main/docker/Dockerfile.legacy-jar b/elasticsearch-quickstart/src/main/docker/Dockerfile.legacy-jar index 1ee6201299..f17e37b0c3 100644 --- a/elasticsearch-quickstart/src/main/docker/Dockerfile.legacy-jar +++ b/elasticsearch-quickstart/src/main/docker/Dockerfile.legacy-jar @@ -85,5 +85,5 @@ COPY target/*-runner.jar /deployments/quarkus-run.jar EXPOSE 8080 USER 185 -ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" diff --git a/getting-started-dev-services/src/main/docker/Dockerfile.jvm b/getting-started-dev-services/src/main/docker/Dockerfile.jvm index 32412ad4ed..db8a67b6e9 100644 --- a/getting-started-dev-services/src/main/docker/Dockerfile.jvm +++ b/getting-started-dev-services/src/main/docker/Dockerfile.jvm @@ -90,6 +90,6 @@ COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/ EXPOSE 8080 USER 185 -ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" diff --git a/getting-started-dev-services/src/main/docker/Dockerfile.legacy-jar b/getting-started-dev-services/src/main/docker/Dockerfile.legacy-jar index dbcea680cf..3b654d0871 100644 --- a/getting-started-dev-services/src/main/docker/Dockerfile.legacy-jar +++ b/getting-started-dev-services/src/main/docker/Dockerfile.legacy-jar @@ -87,5 +87,5 @@ COPY target/*-runner.jar /deployments/quarkus-run.jar EXPOSE 8080 USER 185 -ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" diff --git a/security-webauthn-quickstart/src/main/docker/Dockerfile.jvm b/security-webauthn-quickstart/src/main/docker/Dockerfile.jvm index 68b111889b..e1cde742ba 100644 --- a/security-webauthn-quickstart/src/main/docker/Dockerfile.jvm +++ b/security-webauthn-quickstart/src/main/docker/Dockerfile.jvm @@ -89,6 +89,6 @@ COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/ EXPOSE 8080 USER 185 ENV AB_JOLOKIA_OFF="" -ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" diff --git a/security-webauthn-quickstart/src/main/docker/Dockerfile.legacy-jar b/security-webauthn-quickstart/src/main/docker/Dockerfile.legacy-jar index f615fe80b3..fb9aa94fac 100644 --- a/security-webauthn-quickstart/src/main/docker/Dockerfile.legacy-jar +++ b/security-webauthn-quickstart/src/main/docker/Dockerfile.legacy-jar @@ -86,5 +86,5 @@ COPY target/*-runner.jar /deployments/quarkus-run.jar EXPOSE 8080 USER 185 ENV AB_JOLOKIA_OFF="" -ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"