Skip to content

Commit

Permalink
HTM-1238: Update tomcat and use the Marlin renderer (#6)
Browse files Browse the repository at this point in the history
Also use the new RelateNG options

And remove settings from entrypoint JAVA_OPTS
  • Loading branch information
mprins authored Sep 26, 2024
1 parent 1c3adcf commit f0a5290
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
24 changes: 23 additions & 1 deletion geoserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,32 @@ COPY maven/ /tmp/

RUN mvn -U clean package --fail-at-end --settings .mvn/settings.xml

FROM tomcat:9.0.94-jre17-temurin AS geoserver
FROM tomcat:9.0.95-jre17-temurin AS geoserver

ARG TZ="Europe/Amsterdam"
ARG GEOSERVER_DATA_DIR="/opt/geoserver-data"

ENV JDK_JAVA_OPTIONS="-Djava.awt.headless=true \
-Djava.security.egd=file:/dev/./urandom \
-server -Xms256m -Xmx1g \
--add-exports=java.desktop/sun.awt.image=ALL-UNNAMED \
--add-opens=java.base/java.lang=ALL-UNNAMED \
--add-opens=java.base/java.util=ALL-UNNAMED \
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED \
--add-opens=java.base/java.text=ALL-UNNAMED \
--add-opens=java.desktop/java.awt.font=ALL-UNNAMED \
--add-opens=java.desktop/sun.awt.image=ALL-UNNAMED \
--add-opens=java.naming/com.sun.jndi.ldap=ALL-UNNAMED \
--add-opens=java.desktop/sun.java2d.pipe=ALL-UNNAMED \
-Dfile.encoding=UTF-8 \
-Djavax.servlet.request.encoding=UTF-8 \
-Djavax.servlet.response.encoding=UTF-8 \
-D-XX:SoftRefLRUPolicyMSPerMB=36000 \
-Xbootclasspath/a:$CATALINA_HOME/lib/marlin.jar \
-Dsun.java2d.renderer=sun.java2d.marlin.DMarlinRenderingEngine \
-Dorg.geotools.coverage.jaiext.enabled=true \
-Djts.relate=ng"

RUN set -eux;ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
# cleanup localization and example apps
&& rm /usr/local/tomcat/lib/tomcat-i18n-*.jar \
Expand All @@ -26,6 +47,7 @@ RUN set -eux;ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/t
&& chown -R www-data:www-data $GEOSERVER_DATA_DIR

COPY --chown=www-data:www-data --from=builder /tmp/target/geoserver.war /usr/local/tomcat/webapps/
COPY --from=builder /tmp/target/geoserver/WEB-INF/lib/marlin-*.jar /usr/local/tomcat/lib/marlin.jar
COPY --chown=www-data:www-data maven/src/main/webapp/data/ $GEOSERVER_DATA_DIR
COPY ./docker-entrypoint-initdb.d /docker-entrypoint-initdb.d

Expand Down
3 changes: 2 additions & 1 deletion geoserver/docker-entrypoint-initdb.d/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
set -e
JAVA_OPTS="-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom"

#JAVA_OPTS=
# start tomcat, start the script to update the passwords
/docker-entrypoint-initdb.d/0-reset_passwords.sh &
catalina.sh run
2 changes: 1 addition & 1 deletion postgis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM postgis/postgis:16-3.4

ENV LANG en_US.utf8
ENV LANG=en_US.utf8

ARG TZ="Europe/Amsterdam"

Expand Down
2 changes: 1 addition & 1 deletion sqlserver/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM mcr.microsoft.com/mssql/server:2022-latest

ENV LANG en_US.utf8
ENV LANG=en_US.utf8
ENV ACCEPT_EULA=Y

ARG TZ="Europe/Amsterdam"
Expand Down

0 comments on commit f0a5290

Please sign in to comment.