Missing dependencies for use in geonode-project
lilatomic opened this issue · 4 comments
Hello!
This image is almost identical to the image used in geonode-project.
One critical difference is that this image is missing several dependencies necessary for interacting with postgres&postgis. They are hibernate-spatial-postgis-1.1.3.2.jar
and postgis-jdbc-1.3.3.jar
, and are installed with the line here.
This means that this official prebuilt image cannot be used in the geonode-project and must be built. Installing these dependencies would make it easier to try out Geonode. It would lower the maintenance of a geonode project, since we could just change the dockerfile rather than having to reconcile updates with a newer version of geonode-project and rebuild the geoserver container. It would also help with the issue of avoiding duplication
If it's acceptable to you, I can submit an MR to port the lines from the dockerfile in geonode-project here.
Yes I agree. This image should be updated and aligned to the geonode-project one so that it could be pulled directly without having to rebuild it everytime.
I've been diffing the versions in the 2 repos, making sure all the other files are the same, and I've found some differences that I wasn't sure we wanted to upstream directly:
file | section | geoserver-docker | geonode-project | my thoughts |
---|---|---|---|---|
Dockerfile | JAVA_OPTS | - | use marlin as default | maybe unnecessary? we don't install marlin anymore |
Dockerfile | JAVA_OPTS | - | enable JVM diagnostics | |
entrypoint.sh | templating | - | expand geofence j2 templates | this templating isn't mentioned in either readme. It's a bit geonode-specific, and uses runtime envvars, so it might be worth keeping this templating in geonode-project |
multidump.sh | - | + | I'm not sure what uses these? We could upstream them, or keep them as a step in an extended Dockerfile | |
set_geoserver_auth | SUBSTITUTION_URL | uses DOCKER_HOST_IP and PUBLIC_PORT | changes depending on "NGINX_BASE_URL" | the version in geonode-project falls back to the behaviour in geoserver-docker, so we could just upstream it |
Let me know your thoughts. I think upstreaming all of these is reasonable, and it depends mostly on how tightly we want to tie this image to the geonode project. An alternative would be to have the image in geonode-project use this one as a base and add the things it need on top. For example, if we wanted to keep the entrypoint.sh different, we could do:
FROM geonode/geoserver:2.20.4
WORKDIR /usr/local/tomcat/tmp
COPY entrypoint.sh /usr/local/tomcat/tmp/
RUN chmod +x /usr/local/tomcat/tmp/entrypoint.sh
This approach would still requires building, but it takes only a few seconds. It also makes clear what is geonode-project specific.