New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to official Tomcat 9 - jre 11 base image #45
base: master
Are you sure you want to change the base?
Conversation
Thank you. I like this change and will take some time soon to test this extensively to ensure that all available features are still working with such a "basic" change. |
Dockerfile
Outdated
@@ -1,21 +1,48 @@ | |||
FROM ubuntu:22.04 as tomcat | |||
FROM tomcat:9.0.85-jre11-temurin-jammy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could think about introducing build args like
ARG TOMCAT_VERSION=9.0.85
ARG JAVA_VERSION=11
FROM tomcat:${TOMCAT_VERSION}-jre{JAVA_VERSION}-temurin-jammy
This would give the build more flexibility.
We were previously using the jdk
instead of jre
. I don't know if there was a reason for this? Maybe @jodygarnett knows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not know, GeoServer is supposed to only require JRE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. But it might be tricky to get the JRE going, as it often requires less dependencies, which end up tripping either the startup, the map rendering, or specifically, the point rendering (fontconfig/harfbuzz not being installed or not completely working). Try it out with "topp:states", if that works, it should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea behind using the JRE
image was that this would result in a smaller GeoServer image. I didn't realize that this could lead to side-effects in rendering for example. Thanks @aaime for this hint!
In 2de74a9 I switched back to JDK
in order to be consistent with the previous version and to avoid the difficulties of using the JRE
(see above comment). Furthermore, due to the changes in #39, the catalina.jar
has to be packed/unpacked using jar
to exchange the version info which is not available in the JRE
image.
Would be great if you could resolve the conflicts @ahennr 🙏 |
68dc473
to
577a428
Compare
🏁 |
Co-authored-by: Mark Prins <1165786+mprins@users.noreply.github.com>
In this PR a change of the base image to the official Tomcat 9 (
tomcat:9.0.85-jre11-temurin-jammy
) image is suggested (internally based on ubuntu 22.04). In particular, I see the following advantages of this change: