diff --git a/.env b/.env index 15a50b87..584a7de8 100644 --- a/.env +++ b/.env @@ -1,11 +1,11 @@ COMPOSE_PROJECT_NAME=kartozageoserver IMAGE_VERSION=9.0.65-jdk11-openjdk-slim-buster -GS_VERSION=2.21.2 +GS_VERSION=2.22.0 GEOSERVER_PORT=8600 # Build Arguments JAVA_HOME=/usr/local/openjdk-11 -WAR_URL=http://downloads.sourceforge.net/project/geoserver/GeoServer/2.21.2/geoserver-2.21.2-war.zip +WAR_URL=http://downloads.sourceforge.net/project/geoserver/GeoServer/2.22.0/geoserver-2.22.0-war.zip STABLE_PLUGIN_BASE_URL=https://sonik.dl.sourceforge.net DOWNLOAD_ALL_STABLE_EXTENSIONS=1 DOWNLOAD_ALL_COMMUNITY_EXTENSIONS=1 diff --git a/Dockerfile b/Dockerfile index 62a6aa38..eb830375 100755 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG JAVA_HOME=/usr/local/openjdk-11 FROM tomcat:$IMAGE_VERSION LABEL maintainer="Tim Sutton" -ARG GS_VERSION=2.21.2 +ARG GS_VERSION=2.22.0 ARG WAR_URL=https://downloads.sourceforge.net/project/geoserver/GeoServer/${GS_VERSION}/geoserver-${GS_VERSION}-war.zip ARG STABLE_PLUGIN_BASE_URL=https://sonik.dl.sourceforge.net ARG DOWNLOAD_ALL_STABLE_EXTENSIONS=1 diff --git a/README.md b/README.md index 90ac4594..653aaf1d 100755 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ The preferred way (but using most bandwidth for the initial image) is to get our docker trusted build like this: ```shell -VERSION=2.21.2 +VERSION=2.22.0 docker pull kartoza/geoserver:$VERSION ``` ### Building the image @@ -98,13 +98,13 @@ To build using a specific tagged release for tomcat image set the to choose which tag you need to build against. ``` -ie VERSION=2.21.2 -docker build --build-arg IMAGE_VERSION=8-jre8 --build-arg GS_VERSION=2.21.2 -t kartoza/geoserver:${VERSION} . +ie VERSION=2.22.0 +docker build --build-arg IMAGE_VERSION=8-jre8 --build-arg GS_VERSION=2.22.0 -t kartoza/geoserver:${VERSION} . ``` For some recent builds it is necessary to set the JAVA_PATH as well (e.g. Apache Tomcat/9.0.36) ``` -docker build --build-arg IMAGE_VERSION=9-jdk11-openjdk-slim --build-arg JAVA_HOME=/usr/local/openjdk-11/bin/java --build-arg GS_VERSION=2.21.2 -t kartoza/geoserver:2.21.2 . +docker build --build-arg IMAGE_VERSION=9-jdk11-openjdk-slim --build-arg JAVA_HOME=/usr/local/openjdk-11/bin/java --build-arg GS_VERSION=2.22.0 -t kartoza/geoserver:2.22.0 . ``` **Note:** Please check the [GeoServer documentation](https://docs.geoserver.org/stable/en/user/production/index.html) @@ -171,7 +171,7 @@ The image ships with the following stable plugins: * csw-plugin **Note:** The plugins listed above are omitted from [Stable_plugins.txt](https://github.com/kartoza/docker-geoserver/blob/master/build_data/stable_plugins.txt) -even though they are considered [stable plugins](https://sourceforge.net/projects/geoserver/files/GeoServer/2.21.2/extensions/) +even though they are considered [stable plugins](https://sourceforge.net/projects/geoserver/files/GeoServer/2.22.0/extensions/) The image activates them on startup. The image provides the necessary plugin zip files which are used when activating the @@ -189,7 +189,7 @@ The environment variable `STABLE_EXTENSIONS` can be used to activate plugins lis Example ``` -ie VERSION=2.21.2 +ie VERSION=2.22.0 docker run -d -p 8600:8080 --name geoserver -e STABLE_EXTENSIONS=charts-plugin,db2-plugin kartoza/geoserver:${VERSION} ``` @@ -210,7 +210,7 @@ The environment variable `COMMUNITY_EXTENSIONS` can be used to activate plugins Example ``` -ie VERSION=2.21.2 +ie VERSION=2.22.0 docker run -d -p 8600:8080 --name geoserver -e COMMUNITY_EXTENSIONS=gwc-sqlite-plugin,ogr-datastore-plugin kartoza/geoserver:${VERSION} ``` @@ -228,7 +228,7 @@ Geoserver ships with sample data which can be used by users to familiarize them This is not activated by default. You can activate it using the environment variable `SAMPLE_DATA=true` ``` -ie VERSION=2.21.2 +ie VERSION=2.22.0 docker run -d -p 8600:8080 --name geoserver -e SAMPLE_DATA=true kartoza/geoserver:${VERSION} ``` @@ -303,14 +303,14 @@ If you set the environment variable `SSL=true` but do not provide the pem files the container will generate a self-signed SSL certificates. ``` -ie VERSION=2.21.2 +ie VERSION=2.22.0 docker run -it --name geoserver -e PKCS12_PASSWORD=geoserver -e JKS_KEY_PASSWORD=geoserver -e JKS_STORE_PASSWORD=geoserver -e SSL=true -p 8443:8443 -p 8600:8080 kartoza/geoserver:${VERSION} ``` If you already have your perm files (fullchain.pem and privkey.pem) you can mount the directory containing your keys as: ``` -ie VERSION=2.21.2 +ie VERSION=2.22.0 docker run -it --name geo -v /etc/certs:/etc/certs -e PKCS12_PASSWORD=geoserver -e JKS_KEY_PASSWORD=geoserver -e JKS_STORE_PASSWORD=geoserver -e SSL=true -p 8443:8443 -p 8600:8080 kartoza/geoserver:${VERSION} ``` @@ -386,7 +386,7 @@ To include Tomcat extras including docs, examples, and the manager webapp, set t to use a strong password otherwise the default one is set up. ``` -ie VERSION=2.21.2 +ie VERSION=2.22.0 docker run -it --name geoserver -e TOMCAT_EXTRAS=true -p 8600:8080 kartoza/geoserver:${VERSION} ``` @@ -413,7 +413,7 @@ If you have downloaded extra fonts you can mount the folder to the path path during initialisation. ``` -ie VERSION=2.21.2 +ie VERSION=2.22.0 docker run -v fonts:/opt/fonts -p 8080:8080 -t kartoza/geoserver:${VERSION} ``` diff --git a/build_data/community_plugins.txt b/build_data/community_plugins.txt index fc29a61f..82ebea60 100644 --- a/build_data/community_plugins.txt +++ b/build_data/community_plugins.txt @@ -54,3 +54,4 @@ vsi-plugin wms-eo-plugin wmts-styles-plugin wps-remote-plugin +stac-datastore-plugin diff --git a/clustering/docker-compose.yml b/clustering/docker-compose.yml index 3db53354..cfe6028d 100644 --- a/clustering/docker-compose.yml +++ b/clustering/docker-compose.yml @@ -19,7 +19,7 @@ services: healthcheck: test: "PGPASSWORD=docker pg_isready -h 127.0.0.1 -U docker -d gis" master: - image: kartoza/geoserver:2.21.2 + image: kartoza/geoserver:2.22.0 volumes: - geoserver-cluster-data:/opt/geoserver/data_dir ports: @@ -48,7 +48,7 @@ services: timeout: 10s retries: 3 node: - image: kartoza/geoserver:2.21.2 + image: kartoza/geoserver:2.22.0 volumes: - geoserver-cluster-data:/opt/geoserver/data_dir ports: diff --git a/docker-compose-build.yml b/docker-compose-build.yml index ef997529..cb92da96 100644 --- a/docker-compose-build.yml +++ b/docker-compose-build.yml @@ -36,6 +36,11 @@ services: - HTTP_PROXY_PORT - STABLE_EXTENSIONS=${STABLE_EXTENSIONS} - COMMUNITY_EXTENSIONS=${COMMUNITY_EXTENSIONS} + healthcheck: + test: "curl --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null -u ${GEOSERVER_ADMIN_USER}:'${GEOSERVER_ADMIN_PASSWORD}' http://localhost:8080/geoserver/rest/about/version.xml" + interval: 1m + timeout: 10s + retries: 3 diff --git a/docker-compose-nginx.yml b/docker-compose-nginx.yml index 22256f2c..ad3216de 100644 --- a/docker-compose-nginx.yml +++ b/docker-compose-nginx.yml @@ -19,7 +19,7 @@ services: - FORCE_SSL=TRUE restart: on-failure healthcheck: - test: "exit 0" + test: "PGPASSWORD=${POSTGRES_PASS} pg_isready -h 127.0.0.1 -U ${POSTGRES_USER} -d ${POSTGRES_DB}" geoserver: image: kartoza/geoserver:${GS_VERSION} @@ -37,7 +37,7 @@ services: db: condition: service_healthy healthcheck: - test: curl --fail -s http://localhost:8080/ || exit 1 + test: "curl --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null -u ${GEOSERVER_ADMIN_USER}:'${GEOSERVER_ADMIN_PASSWORD}' http://localhost:8080/geoserver/rest/about/version.xml" interval: 1m30s timeout: 10s retries: 3 diff --git a/docker-compose.yml b/docker-compose.yml index bd68ce9c..1c94f57a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,7 +19,7 @@ services: - FORCE_SSL=TRUE restart: on-failure healthcheck: - test: "PGPASSWORD=${POSTGRES_PASS} pg_isready -h 127.0.0.1 -U docker -d gis" + test: "PGPASSWORD=${POSTGRES_PASS} pg_isready -h 127.0.0.1 -U ${POSTGRES_USER} -d ${POSTGRES_DB}" geoserver: image: kartoza/geoserver:${GS_VERSION} @@ -41,7 +41,7 @@ services: db: condition: service_healthy healthcheck: - test: curl --fail -s http://localhost:8080/ || exit 1 + test: "curl --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null -u ${GEOSERVER_ADMIN_USER}:'${GEOSERVER_ADMIN_PASSWORD}' http://localhost:8080/geoserver/rest/about/version.xml" interval: 1m30s timeout: 10s retries: 3 diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 7c14e99c..e2622f8e 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -72,6 +72,8 @@ export GEOSERVER_OPTS="-Djava.awt.headless=true -server -Xms${INITIAL_MEMORY} -X --patch-module java.desktop=${CATALINA_HOME}/marlin-render.jar \ -Dsun.java2d.renderer=org.marlin.pisces.PiscesRenderingEngine \ -Dgeoserver.login.autocomplete=${LOGIN_STATUS} \ + -DUPDATE_BUILT_IN_LOGGING_PROFILES=${UPDATE_LOGGING_PROFILES} \ + -DRELINQUISH_LOG4J_CONTROL=${RELINQUISH_LOG4J_CONTROL} \ -DGEOSERVER_CONSOLE_DISABLED=${DISABLE_WEB_INTERFACE} \ -DGEOSERVER_CSRF_WHITELIST=${CSRF_WHITELIST} \ -Dgeoserver.xframe.shouldSetPolicy=${XFRAME_OPTIONS} \ diff --git a/scripts/env-data.sh b/scripts/env-data.sh index 221f3b42..a9e9d929 100644 --- a/scripts/env-data.sh +++ b/scripts/env-data.sh @@ -325,3 +325,12 @@ fi if [ -z "${DISABLE_CORS}" ]; then DISABLE_CORS=false fi + +if [ -z "${UPDATE_LOGGING_PROFILES}" ]; then + UPDATE_LOGGING_PROFILES=false +fi + +if [ -z "${RELINQUISH_LOG4J_CONTROL}" ]; then + RELINQUISH_LOG4J_CONTROL=false +fi + diff --git a/scripts/functions.sh b/scripts/functions.sh index c3cd048d..3efa4f1d 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -172,7 +172,8 @@ if [[ ! -f /tmp/resources/geoserver-${GS_VERSION}.zip ]] || [[ ! -f /tmp/resourc else destination=/tmp/geoserver/geoserver.war mkdir -p /tmp/geoserver/ && - ${request} "${WAR_URL}" -O ${destination} + ${request} "${WAR_URL}" -O ${destination} && \ + unzip_geoserver fi else if [[ -f /tmp/resources/geoserver-${GS_VERSION}.zip ]];then diff --git a/scripts/setup.sh b/scripts/setup.sh index 94862ccd..3a7e0ec9 100644 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -75,7 +75,8 @@ pushd ${resources_dir}/plugins || exit array=(geoserver-${GS_VERSION}-vectortiles-plugin.zip geoserver-${GS_VERSION}-wps-plugin.zip geoserver-${GS_VERSION}-printing-plugin.zip geoserver-${GS_VERSION}-libjpeg-turbo-plugin.zip geoserver-${GS_VERSION}-control-flow-plugin.zip geoserver-${GS_VERSION}-pyramid-plugin.zip geoserver-${GS_VERSION}-gdal-plugin.zip - geoserver-${GS_VERSION}-monitor-plugin.zip geoserver-${GS_VERSION}-inspire-plugin.zip geoserver-${GS_VERSION}-csw-plugin.zip ) + geoserver-${GS_VERSION}-monitor-plugin.zip geoserver-${GS_VERSION}-inspire-plugin.zip + geoserver-${GS_VERSION}-csw-plugin.zip geoserver-${GS_VERSION}-csw-iso-plugin.zip) for i in "${array[@]}"; do url="${STABLE_PLUGIN_BASE_URL}/project/geoserver/GeoServer/${GS_VERSION}/extensions/${i}" download_extension "${url}" "${i%.*}" ${resources_dir}/plugins