From bca5b026031a67a1e7a3447d4cffc02c3942d08e Mon Sep 17 00:00:00 2001 From: Gabriel Roldan Date: Mon, 6 Jan 2025 22:00:41 -0300 Subject: [PATCH] Make runtime and AppCDs build steps have matching +UseCompressedOops JVM setting --- compose/.env | 2 +- src/apps/base-images/jre/Dockerfile | 3 ++- src/apps/geoserver/gwc/Dockerfile | 2 +- src/apps/geoserver/restconfig/Dockerfile | 4 ++-- src/apps/geoserver/wcs/Dockerfile | 4 ++-- src/apps/geoserver/webui/Dockerfile | 2 +- src/apps/geoserver/wfs/Dockerfile | 2 +- src/apps/geoserver/wms/Dockerfile | 2 +- src/apps/geoserver/wps/Dockerfile | 2 +- 9 files changed, 12 insertions(+), 11 deletions(-) diff --git a/compose/.env b/compose/.env index 422d8fef5..f13a41ca3 100644 --- a/compose/.env +++ b/compose/.env @@ -25,7 +25,7 @@ DISCOVERY_SERVER_DEFAULT_PROFILES=${LOGGING_PROFILE} # For more information, see https://cloud.spring.io/spring-cloud-config/multi/multi__spring_cloud_config_server.html#_git_backend CONFIG_SERVER_DEFAULT_PROFILES=${LOGGING_PROFILE},native,standalone -JAVA_OPTS_DEFAULT=-XshowSettings:system -Dlogging.config=file:/etc/geoserver/logback-spring.xml +JAVA_OPTS_DEFAULT=-XshowSettings:system -Dlogging.config=file:/etc/geoserver/logback-spring.xml -Xlog:cds JAVA_OPTS_DISCOVERY=$JAVA_OPTS_DEFAULT JAVA_OPTS_CONFIG=$JAVA_OPTS_DEFAULT diff --git a/src/apps/base-images/jre/Dockerfile b/src/apps/base-images/jre/Dockerfile index 1991f2393..6f11f89c0 100644 --- a/src/apps/base-images/jre/Dockerfile +++ b/src/apps/base-images/jre/Dockerfile @@ -15,7 +15,8 @@ ENV DEFAULT_JAVA_TOOL_OPTIONS="\ --add-opens=java.naming/com.sun.jndi.ldap=ALL-UNNAMED \ -Djava.awt.headless=true \ -XX:MaxRAMPercentage=80 \ --XX:InitialRAMPercentage=30" +-XX:InitialRAMPercentage=30 \ +-XX:+UseCompressedOops" ENV JAVA_TOOL_OPTIONS="${DEFAULT_JAVA_TOOL_OPTIONS}" ENV JAVA_OPTS= diff --git a/src/apps/geoserver/gwc/Dockerfile b/src/apps/geoserver/gwc/Dockerfile index adecd7465..32c58dc71 100644 --- a/src/apps/geoserver/gwc/Dockerfile +++ b/src/apps/geoserver/gwc/Dockerfile @@ -32,4 +32,4 @@ RUN java \ org.springframework.boot.loader.JarLauncher RUN rm -rf /tmp/* -ENV JAVA_TOOL_OPTIONS="${DEFAULT_JAVA_TOOL_OPTIONS} -XX:SharedArchiveFile=application.jsa" +ENV JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS} -XX:SharedArchiveFile=application.jsa" diff --git a/src/apps/geoserver/restconfig/Dockerfile b/src/apps/geoserver/restconfig/Dockerfile index 7bb64b09d..32c58dc71 100644 --- a/src/apps/geoserver/restconfig/Dockerfile +++ b/src/apps/geoserver/restconfig/Dockerfile @@ -27,9 +27,9 @@ RUN java \ -XX:ArchiveClassesAtExit=application.jsa \ -Dspring.context.exit=onRefreshed \ -Dspring.profiles.active=standalone,datadir,offline \ --Dgeosever.backend.data-directory.location=/tmp/tmpdatadir \ -Dserver.port=0 -Dmanagement.server.port=0 \ +-Dgeosever.backend.data-directory.location=/tmp/tmpdatadir \ org.springframework.boot.loader.JarLauncher RUN rm -rf /tmp/* -ENV JAVA_TOOL_OPTIONS="${DEFAULT_JAVA_TOOL_OPTIONS} -XX:SharedArchiveFile=application.jsa" +ENV JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS} -XX:SharedArchiveFile=application.jsa" diff --git a/src/apps/geoserver/wcs/Dockerfile b/src/apps/geoserver/wcs/Dockerfile index 7bb64b09d..32c58dc71 100644 --- a/src/apps/geoserver/wcs/Dockerfile +++ b/src/apps/geoserver/wcs/Dockerfile @@ -27,9 +27,9 @@ RUN java \ -XX:ArchiveClassesAtExit=application.jsa \ -Dspring.context.exit=onRefreshed \ -Dspring.profiles.active=standalone,datadir,offline \ --Dgeosever.backend.data-directory.location=/tmp/tmpdatadir \ -Dserver.port=0 -Dmanagement.server.port=0 \ +-Dgeosever.backend.data-directory.location=/tmp/tmpdatadir \ org.springframework.boot.loader.JarLauncher RUN rm -rf /tmp/* -ENV JAVA_TOOL_OPTIONS="${DEFAULT_JAVA_TOOL_OPTIONS} -XX:SharedArchiveFile=application.jsa" +ENV JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS} -XX:SharedArchiveFile=application.jsa" diff --git a/src/apps/geoserver/webui/Dockerfile b/src/apps/geoserver/webui/Dockerfile index adecd7465..32c58dc71 100644 --- a/src/apps/geoserver/webui/Dockerfile +++ b/src/apps/geoserver/webui/Dockerfile @@ -32,4 +32,4 @@ RUN java \ org.springframework.boot.loader.JarLauncher RUN rm -rf /tmp/* -ENV JAVA_TOOL_OPTIONS="${DEFAULT_JAVA_TOOL_OPTIONS} -XX:SharedArchiveFile=application.jsa" +ENV JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS} -XX:SharedArchiveFile=application.jsa" diff --git a/src/apps/geoserver/wfs/Dockerfile b/src/apps/geoserver/wfs/Dockerfile index adecd7465..32c58dc71 100644 --- a/src/apps/geoserver/wfs/Dockerfile +++ b/src/apps/geoserver/wfs/Dockerfile @@ -32,4 +32,4 @@ RUN java \ org.springframework.boot.loader.JarLauncher RUN rm -rf /tmp/* -ENV JAVA_TOOL_OPTIONS="${DEFAULT_JAVA_TOOL_OPTIONS} -XX:SharedArchiveFile=application.jsa" +ENV JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS} -XX:SharedArchiveFile=application.jsa" diff --git a/src/apps/geoserver/wms/Dockerfile b/src/apps/geoserver/wms/Dockerfile index adecd7465..32c58dc71 100644 --- a/src/apps/geoserver/wms/Dockerfile +++ b/src/apps/geoserver/wms/Dockerfile @@ -32,4 +32,4 @@ RUN java \ org.springframework.boot.loader.JarLauncher RUN rm -rf /tmp/* -ENV JAVA_TOOL_OPTIONS="${DEFAULT_JAVA_TOOL_OPTIONS} -XX:SharedArchiveFile=application.jsa" +ENV JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS} -XX:SharedArchiveFile=application.jsa" diff --git a/src/apps/geoserver/wps/Dockerfile b/src/apps/geoserver/wps/Dockerfile index adecd7465..32c58dc71 100644 --- a/src/apps/geoserver/wps/Dockerfile +++ b/src/apps/geoserver/wps/Dockerfile @@ -32,4 +32,4 @@ RUN java \ org.springframework.boot.loader.JarLauncher RUN rm -rf /tmp/* -ENV JAVA_TOOL_OPTIONS="${DEFAULT_JAVA_TOOL_OPTIONS} -XX:SharedArchiveFile=application.jsa" +ENV JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS} -XX:SharedArchiveFile=application.jsa"