Compare commits

...

97 Commits

Author SHA1 Message Date
Nils Bühner 6019fc9e75
Merge pull request #141 from geoserver/renovate/github-codeql-action-digest
chore(deps): update github/codeql-action digest to dd74661
2025-01-30 12:02:24 +01:00
renovate[bot] 01647ef027
chore(deps): update github/codeql-action digest to dd74661 2025-01-29 21:38:59 +00:00
Nils Bühner 5839d401f7
Merge pull request #136 from geoserver/renovate/github-codeql-action-digest
chore(deps): update github/codeql-action digest to 6e54559
2025-01-29 17:02:05 +01:00
Nils Bühner a9f478eb80
Merge pull request #137 from geoserver/renovate/tomcat-9.0.98-jdk17-temurin-jammy
chore(deps): update tomcat:9.0.98-jdk17-temurin-jammy docker digest to 4cce437
2025-01-29 17:01:50 +01:00
Nils Bühner dd3bf48edc
Merge pull request #139 from B3Partners/geoserver-2.26.2
Bump GeoServer version from 2.26.1 to 2.26.2
2025-01-29 17:01:28 +01:00
renovate[bot] a3ba5b01f5
chore(deps): update github/codeql-action digest to 6e54559 2025-01-29 16:00:18 +00:00
Nils Bühner 1147dc3e8e
Merge pull request #140 from mprins/patch-1
Create a Security Policy file that point to GeoServer
2025-01-29 16:59:53 +01:00
Mark Prins cb2ac134e1
Update SECURITY.md punctuation and wording 2025-01-29 13:42:56 +01:00
Mark Prins 78d8207004
Create a Security Policy file that point to GeoServer
Add a pointer to the GeoServer Security Policy and published advisories
2025-01-29 13:42:16 +01:00
Mark Prins 7b6ec7ccf5
update base image sha256 to latest 2025-01-28 12:18:04 +01:00
Mark Prins ac2c46da3f
Bump GeoServer version from 2.26.1 to 2.26.2 2025-01-28 12:12:34 +01:00
renovate[bot] 05aa8f0559
chore(deps): update tomcat:9.0.98-jdk17-temurin-jammy docker digest to 4cce437 2025-01-23 22:44:52 +00:00
Nils Bühner ac3e126222
Merge pull request #134 from geoserver/renovate/tomcat-9.0.98-jdk17-temurin-jammy
chore(deps): update tomcat:9.0.98-jdk17-temurin-jammy docker digest to 1f35364
2025-01-14 09:07:39 +01:00
renovate[bot] 4737cf6e79
chore(deps): update tomcat:9.0.98-jdk17-temurin-jammy docker digest to 1f35364 2025-01-14 08:05:51 +00:00
Nils Bühner a38cf9fa8e
Merge pull request #133 from geoserver/renovate/tomcat-9.0.98-jdk17-temurin-jammy
chore(deps): update tomcat:9.0.98-jdk17-temurin-jammy docker digest to 726dc50
2025-01-14 09:05:21 +01:00
renovate[bot] 9513a3145b
chore(deps): update tomcat:9.0.98-jdk17-temurin-jammy docker digest to 726dc50 2025-01-14 05:18:51 +00:00
Nils Bühner 295ddaf6ff
Merge pull request #132 from geoserver/renovate/github-codeql-action-digest
chore(deps): update github/codeql-action digest to b6a472f
2025-01-13 08:51:14 +01:00
renovate[bot] 486063c9cd
chore(deps): update github/codeql-action digest to b6a472f 2025-01-10 22:18:02 +00:00
Nils Bühner 89e1959e0b
Merge pull request #131 from geoserver/renovate/github-codeql-action-digest
chore(deps): update github/codeql-action digest to 48ab28a
2025-01-06 09:33:44 +01:00
renovate[bot] de062e3ab5
chore(deps): update github/codeql-action digest to 48ab28a 2024-12-20 19:29:19 +00:00
Nils Bühner 492ffd407b
Merge pull request #130 from petersmythe/peter-bump-to-latest-version
Bump version to 2.26.1
2024-12-17 13:19:57 +01:00
Peter Smythe 47d58bdf86 Bump version to 2.26.1 2024-12-17 14:07:52 +02:00
Nils Bühner c664d1b2e0
Merge pull request #129 from geoserver/renovate/github-codeql-action-digest
chore(deps): update github/codeql-action digest to df409f7
2024-12-13 09:34:11 +01:00
renovate[bot] 498a0e903d
chore(deps): update github/codeql-action digest to df409f7 2024-12-13 01:14:39 +00:00
Nils Bühner 8a4fb068c4
Merge pull request #128 from geoserver/renovate/tomcat-9.0.98-jdk17-temurin-jammy
chore(deps): update tomcat:9.0.98-jdk17-temurin-jammy docker digest to 3d6741c
2024-12-10 16:40:05 +01:00
Nils Bühner 6768236754
Merge pull request #127 from geoserver/renovate/github-codeql-action-digest
chore(deps): update github/codeql-action digest to babb554
2024-12-10 16:39:57 +01:00
renovate[bot] 979508c20c
chore(deps): update tomcat:9.0.98-jdk17-temurin-jammy docker digest to 3d6741c 2024-12-10 15:27:00 +00:00
renovate[bot] d5b58c8379
chore(deps): update github/codeql-action digest to babb554 2024-12-10 15:26:56 +00:00
Nils Bühner 4835db8c26
Merge pull request #125 from geoserver/renovate/github-codeql-action-digest
chore(deps): update github/codeql-action digest to aa57810
2024-12-10 10:17:22 +01:00
Nils Bühner c51a109022
Merge pull request #126 from geoserver/renovate/tomcat-9.x
chore(deps): update tomcat docker tag to v9.0.98
2024-12-10 10:17:10 +01:00
renovate[bot] 29e01f3462
chore(deps): update tomcat docker tag to v9.0.98 2024-12-10 08:21:27 +00:00
renovate[bot] 3fce80fae0
chore(deps): update github/codeql-action digest to aa57810 2024-12-03 12:20:27 +00:00
Nils Bühner 055f2c8bb0
Merge pull request #123 from buehner/arbitrary-datadirs
feat: ensure that the datadir always exists
2024-11-26 11:29:16 +01:00
Nils Bühner 597f74a79d
Merge pull request #124 from reinout/reinout-doc-context-update
Documented that context.xml isn't used anymore
2024-11-26 11:29:02 +01:00
Reinout van Rees db828cd146
Documented that context.xml isn't used anymore 2024-11-25 15:06:40 +01:00
Nils Bühner bc10da56a3 feat: ensure that the datadir always exists 2024-11-21 16:49:19 +01:00
Nils Bühner 887b98e352
Merge pull request #62 from simonseyock/skip-demo-data
feat: set GEOSERVER_REQUIRE_FILE to currently used $GEOSERVER_DATA_DIR in startup.sh
2024-11-21 16:26:04 +01:00
Simon Seyock b8e32c57d9 feat: introduce SET_GEOSERVER_REQUIRE_FILE variable 2024-11-21 15:47:22 +01:00
Nils Bühner 4ab8c08323
Merge pull request #122 from geoserver/renovate/github-codeql-action-digest
chore(deps): update github/codeql-action digest to f09c1c0
2024-11-20 16:07:48 +01:00
Nils Bühner 35ce7d66bb
Merge pull request #100 from geoserver/renovate/postgis-postgis-17.x
chore(deps): update postgis/postgis docker tag to v17
2024-11-20 16:07:33 +01:00
renovate[bot] 1f0c20cbfa
chore(deps): update github/codeql-action digest to f09c1c0 2024-11-20 14:57:46 +00:00
Nils Bühner 2eb3ad3976
Merge pull request #118 from geoserver/renovate/github-codeql-action-digest
chore(deps): update github/codeql-action digest to ea9e4e3
2024-11-18 10:02:28 +01:00
Nils Bühner c3432903f8
Merge pull request #119 from geoserver/renovate/tomcat-9.x
chore(deps): update tomcat docker tag to v9.0.97
2024-11-18 10:02:13 +01:00
renovate[bot] d60a776bd9
chore(deps): update github/codeql-action digest to ea9e4e3 2024-11-14 16:01:49 +00:00
renovate[bot] fd4e311458
chore(deps): update tomcat docker tag to v9.0.97 2024-11-12 01:57:39 +00:00
Nils Bühner 6123d71976
Merge pull request #109 from boeckMt/fix-cors
The default cors.allowed.headers `*` is not working
2024-10-29 13:25:52 +01:00
Nils Bühner ce6d094384
Merge pull request #111 from petermorstn/readme-credentials-overwrite-info
update readme with information about credential overwrite issue
2024-10-29 13:23:31 +01:00
Nils Bühner 239a5372c2
Merge pull request #117 from geoserver/renovate/tomcat-9.0.96-jdk17-temurin-jammy
chore(deps): update tomcat:9.0.96-jdk17-temurin-jammy docker digest to 0178e7f
2024-10-29 11:15:54 +01:00
renovate[bot] 01123e3beb
chore(deps): update tomcat:9.0.96-jdk17-temurin-jammy docker digest to 0178e7f 2024-10-25 04:14:00 +00:00
Nils Bühner 3d196055f8
Merge pull request #116 from geoserver/renovate/tomcat-9.0.96-jdk17-temurin-jammy
chore(deps): update tomcat:9.0.96-jdk17-temurin-jammy docker digest to f4ddc81
2024-10-24 12:54:28 +02:00
renovate[bot] 760f360655
chore(deps): update tomcat:9.0.96-jdk17-temurin-jammy docker digest to f4ddc81 2024-10-24 10:07:14 +00:00
Nils Bühner 5743ea7a92
Merge pull request #115 from geoserver/renovate/tomcat-9.0.96-jdk17-temurin-jammy
chore(deps): update tomcat:9.0.96-jdk17-temurin-jammy docker digest to 369402c
2024-10-24 09:22:37 +02:00
renovate[bot] 38d8517270
chore(deps): update tomcat:9.0.96-jdk17-temurin-jammy docker digest to 369402c 2024-10-24 07:13:27 +00:00
Nils Bühner ce930d7af3
Merge pull request #114 from geoserver/renovate/actions-checkout-digest
chore(deps): update actions/checkout digest to 11bd719
2024-10-24 09:12:58 +02:00
renovate[bot] e988cf2f56
chore(deps): update actions/checkout digest to 11bd719 2024-10-23 17:42:38 +00:00
renovate[bot] aa4c112da4
chore(deps): update postgis/postgis docker tag to v17 2024-10-23 07:06:32 +00:00
Nils Bühner c666b550a0
Merge pull request #112 from geoserver/renovate/github-codeql-action-digest
chore(deps): update github/codeql-action digest to 6624720
2024-10-23 09:06:32 +02:00
Nils Bühner 80eb4e2f7b
Merge pull request #110 from geoserver/renovate/postgis-postgis-16-3.4-alpine
chore(deps): update postgis/postgis:16-3.4-alpine docker digest to 681931a
2024-10-23 09:06:10 +02:00
Nils Bühner bc99183c50
Merge pull request #113 from geoserver/renovate/tomcat-9.0.96-jdk17-temurin-jammy
chore(deps): update tomcat:9.0.96-jdk17-temurin-jammy docker digest to 44595bd
2024-10-23 09:05:57 +02:00
renovate[bot] e068cd1338
chore(deps): update github/codeql-action digest to 6624720 2024-10-22 16:32:21 +00:00
renovate[bot] befcc8c9ad
chore(deps): update tomcat:9.0.96-jdk17-temurin-jammy docker digest to 44595bd 2024-10-19 16:54:48 +00:00
Peter Morstein 27337a4756 update readme with information about credential overwrite issue 2024-10-14 11:23:28 +02:00
renovate[bot] 7decb251b5
chore(deps): update postgis/postgis:16-3.4-alpine docker digest to 681931a 2024-10-14 07:13:11 +00:00
Mathias Boeck e8ebfdcc30 fix: add missing allowed headers to environment variables 2024-10-10 12:44:00 +02:00
Mathias Boeck d2797fc416 fix: add default cors.allowed.headers from tomcat-9.0-doc 2024-10-10 11:58:40 +02:00
Nils Bühner 8bf8ecae0b
Merge pull request #108 from geoserver/renovate/tomcat-9.x
chore(deps): update tomcat docker tag to v9.0.96
2024-10-09 09:01:44 +02:00
renovate[bot] 5c6921ba92
chore(deps): update tomcat docker tag to v9.0.96 2024-10-09 06:02:41 +00:00
Nils Bühner bf0450adaa
Merge pull request #107 from pesekon2/update_version_2.25_to_2.26
update current version: 2.25 -> 2.26
2024-10-08 13:16:32 +02:00
Ondrej Pesek 383ab8db41 update current version: 2.25 -> 2.26 2024-10-08 12:54:27 +02:00
Nils Bühner 9b9daba7e4
Merge pull request #106 from pi-geosolutions/document_unprivileged_user
Document the unprivileged user mode
2024-10-08 11:39:53 +02:00
Jean Pommier 8e7913946c Document the unprivileged user mode 2024-10-08 11:28:17 +02:00
Nils Bühner c737e45ea5
Merge pull request #105 from geoserver/renovate/github-codeql-action-digest
chore(deps): update github/codeql-action digest to c36620d
2024-10-08 10:03:23 +02:00
Nils Bühner 41f0e55890
Merge pull request #104 from geoserver/renovate/actions-checkout-digest
chore(deps): update actions/checkout digest to eef6144
2024-10-08 09:14:34 +02:00
renovate[bot] 101d0a2325
chore(deps): update github/codeql-action digest to c36620d 2024-10-07 19:07:22 +00:00
renovate[bot] 0646db45e0
chore(deps): update actions/checkout digest to eef6144 2024-10-07 19:07:19 +00:00
Nils Bühner bf317fddaf
Merge pull request #97 from pi-geosolutions/run_as_non_root
Allow running tomcat as non-root
2024-10-07 11:12:50 +02:00
Nils Bühner ef31e65f70
Merge pull request #101 from geoserver/renovate/github-codeql-action-digest
chore(deps): update github/codeql-action digest to 6db8d63
2024-10-07 09:49:36 +02:00
Nils Bühner 2292da8ab6
Merge pull request #103 from geoserver/renovate/postgis-postgis-16-3.4-alpine
chore(deps): update postgis/postgis:16-3.4-alpine docker digest to 2451373
2024-10-07 09:48:26 +02:00
renovate[bot] 8cd8a48c85
chore(deps): update postgis/postgis:16-3.4-alpine docker digest to 2451373 2024-10-07 07:14:43 +00:00
renovate[bot] 25389e7255
chore(deps): update github/codeql-action digest to 6db8d63 2024-10-03 21:42:40 +00:00
Nils Bühner 68248ba9ab
Merge pull request #99 from geoserver/renovate/postgis-postgis-16-3.4-alpine
chore(deps): update postgis/postgis:16-3.4-alpine docker digest to 5f8a840
2024-09-30 09:19:30 +02:00
renovate[bot] 9b9015a9de
chore(deps): update postgis/postgis:16-3.4-alpine docker digest to 5f8a840 2024-09-30 06:18:57 +00:00
Jean Pommier a306878d8a Fix exec function when running the container as root 2024-09-25 16:48:31 +02:00
Nils Bühner 60f78198d2
Merge pull request #98 from geoserver/renovate/github-codeql-action-digest
chore(deps): update github/codeql-action digest to 461ef6c
2024-09-25 10:12:50 +02:00
Jody Garnett 7f928d8146 Update CATALINA_OPTS with --add-opens and add-exports for Java 17 use 2024-09-24 16:36:33 -07:00
Jody Garnett 4137b23869 we were unable to get build server happy with containerd multi platform support 2024-09-24 12:02:22 -07:00
Jody Garnett c52cfbce49 clean up downloaded zip so not included in stage reducing layer size
split the apt-get update, from the geoserver download
2024-09-24 11:56:17 -07:00
Stefan Tzeggai 1f2a5e9ce9 Fix typo on echo-logging 2024-09-24 11:56:17 -07:00
Stefan Tzeggai 14140d5fd0 Build and release Geoserver multi-platform for ARM64 and AMD64. This requires docker-daemon to be setup for multi-platform, where QEMU is the slowest but simplest solution: https://docs.docker.com/build/building/multi-platform/#qemu 2024-09-24 11:56:17 -07:00
renovate[bot] ceec4aae78
chore(deps): update github/codeql-action digest to 461ef6c 2024-09-24 18:48:41 +00:00
Jody Garnett 57aef7ef5f
Main has updated to 2.27.x 2024-09-24 11:25:41 -07:00
Jean Pommier 245d346801 Allow running tomcat as non-root
It is a good practice to allow running a container as unprivileged user.
To preserve backward compatibility and provide flexibility, this feature
is added at the entrypoint level and is set using environment variables.
- RUN_UNPRIVILEGED=true activates the unprivileged mode with default uid:gid
as 999:999
- RUN_WITH_USER_UID allows to set the uid used for tomcat user
- RUN_WITH_USER_UID allows to set the gid used for tomcat group
- CHANGE_OWNERSHIP_ON_FOLDERS accepts a space-separated list of folder on
which a chmod will be run, changing (recursively) the ownership for the
tomcat user.
2024-09-24 18:12:16 +02:00
Nils Bühner d2127af5a7
Merge pull request #96 from geoserver/renovate/tomcat-9.0.95-jdk17-temurin-jammy
chore(deps): update tomcat:9.0.95-jdk17-temurin-jammy docker digest to a9088b3
2024-09-23 09:55:37 +02:00
renovate[bot] 92ccfb8a48
chore(deps): update tomcat:9.0.95-jdk17-temurin-jammy docker digest to a9088b3 2024-09-23 07:54:51 +00:00
Nils Bühner 15639dd3d4
Merge pull request #95 from geoserver/jdk17
chore: use JDK 17
2024-09-23 09:54:28 +02:00
Nils Bühner 56748de836
Merge pull request #94 from geoserver/gs-2.25.3
chore: use latest gs everywhere
2024-09-23 09:50:20 +02:00
Nils Bühner 2481d12e45 chore: use latest gs everywhere 2024-09-23 09:24:34 +02:00
9 changed files with 173 additions and 63 deletions

View File

@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Build image
run: docker build -t geoserver-docker.osgeo.org/geoserver:${{ github.sha }} .
- name: Run trivy
@ -22,6 +22,6 @@ jobs:
severity: 'CRITICAL,HIGH'
vuln-type: 'os,library'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@294a9d92911152fe08befb9ec03e240add280cb3 # v3
uses: github/codeql-action/upload-sarif@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3
with:
sarif_file: 'trivy-results.sarif'

View File

@ -65,14 +65,14 @@ Override these arguments to make use of build.geoserver.org nightly releases:
* ``--build-arg STABLE_PLUGIN_URL=https://build.geoserver.org/geoserver/${GS_VERSION}/ext-latest/``
* ``--build-arg COMMUNITY_PLUGIN_URL=https://build.geoserver.org/geoserver/${GS_VERSION}/community-latest/``
Here is a working example for building 2.25.x nightly build::
Here is a working example for building 2.26.x nightly build::
```
docker build --no-cache-filter download,install \
--build-arg WAR_ZIP_URL=https://build.geoserver.org/geoserver/2.25.x/geoserver-2.25.x-latest-war.zip \
--build-arg STABLE_PLUGIN_URL=https://build.geoserver.org/geoserver/2.25.x/ext-latest/ \
--build-arg COMMUNITY_PLUGIN_URL=https://build.geoserver.org/geoserver/2.25.x/community-latest/ \
--build-arg WAR_ZIP_URL=https://build.geoserver.org/geoserver/2.26.x/geoserver-2.26.x-latest-war.zip \
--build-arg STABLE_PLUGIN_URL=https://build.geoserver.org/geoserver/2.26.x/ext-latest/ \
--build-arg COMMUNITY_PLUGIN_URL=https://build.geoserver.org/geoserver/2.26.x/community-latest/ \
--build-arg GS_VERSION=2.24-SNAPSHOT \
-t 2.25.x .
-t 2.26.x .
```
When running both stable extensions and community modules can be included:
@ -82,7 +82,7 @@ docker run -it -p 80:8080 \
--env INSTALL_EXTENSIONS=true \
--env STABLE_EXTENSIONS="ysld" \
--env COMMUNITY_EXTENSIONS="ogcapi" \
-t 2.25.x
-t 2.26.x
```
Community modules are only available for nightly builds as they have not yet met the requirements for production use. Developers have shared these to attract participation, feedback and funding.
@ -96,7 +96,7 @@ The build.geoserver.org output for the ``main`` branch requires the following:
* ``--build-arg COMMUNITY_PLUGIN_URL=https://build.geoserver.org/geoserver/main/community-latest/``
Here is a working example for building main branch as 2.25.x build:
Here is a working example for building main branch as 2.26.x build:
```
docker build --no-cache-filter download,install \
@ -104,7 +104,7 @@ docker build --no-cache-filter download,install \
--build-arg STABLE_PLUGIN_URL=https://build.geoserver.org/geoserver/main/ext-latest/ \
--build-arg COMMUNITY_PLUGIN_URL=https://build.geoserver.org/geoserver/main/community-latest/ \
--build-arg GS_VERSION=2.24-SNAPSHOT \
-t 2.25.x .
-t 2.26.x .
```
When running both [stable extensions](https://build.geoserver.org/geoserver/main/ext-latest/) and [community modules](https://build.geoserver.org/geoserver/main/community-latest/) can be included:
@ -114,6 +114,6 @@ docker run -it -p 80:8080 \
--env INSTALL_EXTENSIONS=true \
--env STABLE_EXTENSIONS="wps,css" \
--env COMMUNITY_EXTENSIONS="ogcapi-coverages,ogcapi-dggs,ogcapi-features,ogcapi-images,ogcapi-maps,ogcapi-styles,ogcapi-tiled-features,ogcapi-tiles" \
-t 2.25.x
-t 2.26.x
```

View File

@ -1,18 +1,18 @@
FROM tomcat:9.0.95-jdk17-temurin-jammy@sha256:4ac5245eb0de6361774a8e3b2cd57d368bdec614028d945e51530072a791b84c
FROM tomcat:9.0.98-jdk17-temurin-jammy@sha256:4cce4376204e1b73ec6864988d6a7da3f7648fd5209442323fabaa00fbe6c335
LABEL vendor="osgeo.org"
# Build arguments
ARG ADDITIONAL_FONTS_PATH=./additional_fonts/
ARG ADDITIONAL_LIBS_PATH=./additional_libs/
ARG COMMUNITY_PLUGIN_URL=''
ARG CORS_ALLOWED_HEADERS=*
ARG CORS_ALLOWED_HEADERS=Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers
ARG CORS_ALLOWED_METHODS=GET,POST,PUT,DELETE,HEAD,OPTIONS
ARG CORS_ALLOWED_ORIGINS=*
ARG CORS_ALLOW_CREDENTIALS=false
ARG CORS_ENABLED=false
ARG GS_BUILD=release
ARG GS_DATA_PATH=./geoserver_data/
ARG GS_VERSION=2.25.2
ARG GS_VERSION=2.26.2
ARG STABLE_PLUGIN_URL=https://downloads.sourceforge.net/project/geoserver/GeoServer/${GS_VERSION}/extensions
ARG WAR_ZIP_URL=https://downloads.sourceforge.net/project/geoserver/GeoServer/${GS_VERSION}/geoserver-${GS_VERSION}-war.zip
@ -33,20 +33,43 @@ ENV EXTRA_JAVA_OPTS="-Xms256m -Xmx1g"
ENV GEOSERVER_BUILD=$GS_BUILD
ENV GEOSERVER_DATA_DIR=/opt/geoserver_data/
ENV GEOSERVER_LIB_DIR=$CATALINA_HOME/webapps/geoserver/WEB-INF/lib/
ENV GEOSERVER_REQUIRE_FILE=$GEOSERVER_DATA_DIR/global.xml
ENV SET_GEOSERVER_REQUIRE_FILE=true
ENV GEOSERVER_VERSION=$GS_VERSION
ENV HEALTHCHECK_URL=''
ENV INSTALL_EXTENSIONS=false
ENV POSTGRES_JNDI_ENABLED=false
ENV ROOT_WEBAPP_REDIRECT=false
ENV RUN_UNPRIVILEGED=false
ENV RUN_WITH_USER_UID=
ENV RUN_WITH_USER_GID=
ENV CHANGE_OWNERSHIP_ON_FOLDERS="/opt $GEOSERVER_DATA_DIR"
ENV SKIP_DEMO_DATA=false
ENV STABLE_EXTENSIONS=''
ENV STABLE_PLUGIN_URL=$STABLE_PLUGIN_URL
ENV WAR_ZIP_URL=$WAR_ZIP_URL
ENV WEBAPP_CONTEXT=geoserver
# ENV JDK_JAVA_OPTIONS=--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
# see https://docs.geoserver.org/stable/en/user/production/container.html
ENV CATALINA_OPTS="\$EXTRA_JAVA_OPTS \
--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 \
-Djava.awt.headless=true -server \
-Dfile.encoding=UTF-8 \
-Djavax.servlet.request.encoding=UTF-8 \
@ -58,19 +81,23 @@ ENV CATALINA_OPTS="\$EXTRA_JAVA_OPTS \
WORKDIR /tmp
# Install dependencies and download geoserver
# Install dependencies
RUN set -eux \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y --no-install-recommends openssl unzip curl locales gettext \
&& apt-get install -y --no-install-recommends openssl unzip curl locales gettext gosu \
&& apt-get clean \
&& rm -rf /var/cache/apt/* \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/lib/apt/lists/*
# Download geoserver
RUN set -eux \
&& echo "Downloading GeoServer ${GS_VERSION} ${GS_BUILD}" \
&& wget -q -O /tmp/geoserver.zip $WAR_ZIP_URL \
&& unzip geoserver.zip geoserver.war -d /tmp/ \
&& unzip -q /tmp/geoserver.war -d /tmp/geoserver \
&& rm /tmp/geoserver.war \
&& rm geoserver.zip \
&& echo "Installing GeoServer $GS_VERSION $GS_BUILD" \
&& mv /tmp/geoserver $CATALINA_HOME/webapps/geoserver \
&& mv $CATALINA_HOME/webapps/geoserver/WEB-INF/lib/marlin-*.jar $CATALINA_HOME/lib/marlin.jar \
@ -116,6 +143,14 @@ RUN apt purge -y \
RUN chmod +x /opt/*.sh && sed -i 's/\r$//' /opt/startup.sh
# # Create a non-privileged tomcat user
# ARG USER_GID=999
# ARG USER_UID=999
# RUN addgroup --gid ${USER_GID} tomcat && \
# adduser --system -u ${USER_UID} --gid ${USER_GID} --no-create-home tomcat && \
# chown -R tomcat:tomcat /opt && \
# chown tomcat:tomcat $GEOSERVER_DATA_DIR
ENTRYPOINT ["bash", "/opt/startup.sh"]
WORKDIR /opt

View File

@ -21,20 +21,20 @@ This README.md file covers use of official docker image, additional [build](BUIL
To pull an official image use ``docker.osgeo.org/geoserver:{{VERSION}}``, e.g.:
```shell
docker pull docker.osgeo.org/geoserver:2.25.2
docker pull docker.osgeo.org/geoserver:2.26.2
```
All the images can be found at: [https://repo.osgeo.org](https://repo.osgeo.org/#browse/browse:geoserver-docker:v2/geoserver/tags) and the latest stable and maintenance version numbers can be obtained from [https://geoserver.org/download/](https://geoserver.org/download/)
Afterwards you can run the pulled image locally with:
```shell
docker run -it -p 80:8080 docker.osgeo.org/geoserver:2.25.2
docker run -it -p 80:8080 docker.osgeo.org/geoserver:2.26.2
```
Or if you want to start the container daemonized, use e.g.:
```shell
docker run -d -p 80:8080 docker.osgeo.org/geoserver:2.25.2
docker run -d -p 80:8080 docker.osgeo.org/geoserver:2.26.2
```
Check <http://localhost/geoserver> to see the geoserver page,
@ -51,7 +51,7 @@ To use an external folder as your geoserver data directory.
```shell
docker run -it -p 80:8080 \
--mount src="/absolute/path/on/host",target=/opt/geoserver_data/,type=bind \
docker.osgeo.org/geoserver:2.25.2
docker.osgeo.org/geoserver:2.26.2
```
An empty data directory will be populated on first use. You can easily update GeoServer while
@ -66,7 +66,7 @@ The environment variable `SKIP_DEMO_DATA` can be set to `true` to create an empt
```shell
docker run -it -p 80:8080 \
--env SKIP_DEMO_DATA=true \
docker.osgeo.org/geoserver:2.25.2
docker.osgeo.org/geoserver:2.26.2
```
## How to set the application context path?
@ -79,14 +79,14 @@ The following will serve GeoServer from the root (<http://localhost/>):
```shell
docker run -it -p 80:8080 \
--env WEBAPP_CONTEXT="" \
docker.osgeo.org/geoserver:2.25.1
docker.osgeo.org/geoserver:2.26.2
```
The following will serve GeoServer from <http://localhost/my_context_path>:
```shell
docker run -it -p 80:8080 \
--env WEBAPP_CONTEXT="my_context_path" \
docker.osgeo.org/geoserver:2.25.1
docker.osgeo.org/geoserver:2.26.2
```
## How to issue a redirect from the root ("/") to GeoServer web interface ("/geoserver/web")?
@ -103,7 +103,7 @@ The ``startup.sh`` script allows some customization on startup:
* ``CORS_ENABLED`` to ``true`` to enable CORS support. The following environment variables can be used to customize the CORS configuration.
* ``CORS_ALLOWED_ORIGINS`` (default ``*``)
* ``CORS_ALLOWED_METHODS`` (default ``GET,POST,PUT,DELETE,HEAD,OPTIONS``)
* ``CORS_ALLOWED_HEADERS`` (default ``*``)
* ``CORS_ALLOWED_HEADERS`` (default ``Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers``)
* ``CORS_ALLOW_CREDENTIALS`` (default ``false``) **Setting this to ``true`` will only have the desired effect if ``CORS_ALLOWED_ORIGINS`` defines explicit origins (not ``*``)**
* ``PROXY_BASE_URL`` to the base URL of the GeoServer web app if GeoServer is behind a proxy. Example: ``https://example.com/geoserver``.
@ -116,7 +116,7 @@ Example installing wps and ysld extensions:
```shell
docker run -it -p 80:8080 \
--env INSTALL_EXTENSIONS=true --env STABLE_EXTENSIONS="wps,ysld" \
docker.osgeo.org/geoserver:2.25.2
docker.osgeo.org/geoserver:2.26.2
```
The list of extensions (taken from SourceForge download page):
@ -141,7 +141,7 @@ If you want to add geoserver extensions/libs, place the respective jar files in
```shell
docker run -it -p 80:8080 \
--mount src="/dir/with/libs/on/host",target=/opt/additional_libs,type=bind \
docker.osgeo.org/geoserver:2.25.2
docker.osgeo.org/geoserver:2.26.2
```
## How to add additional fonts to the docker image (e.g. for SLD styling)?
@ -151,7 +151,7 @@ If you want to add custom fonts (the base image only contains 26 fonts) by using
```shell
docker run -it -p 80:8080 \
--mount src="/dir/with/fonts/on/host",target=/opt/additional_fonts,type=bind \
docker.osgeo.org/geoserver:2.25.2
docker.osgeo.org/geoserver:2.26.2
```
**Note:** Do not change the target value!
@ -171,12 +171,15 @@ To enable a PostgreSQL JNDI resource, provide the following environment variable
In geoserver, you can then reference this JNDI resource using the name `java:comp/env/jdbc/postgres` (if using default).
Note: previously you could tweak the JNDI settings in a custom `context.xml` (see below), but its contents are now included in `server.xml`.
## How to use custom (tomcat) configuration files
This image provides default (tomcat) configurations that are located in the `./config/` subdir.
* `context.xml` (see/compare JNDI feature from above)
* `server.xml` (security hardened version by default)
* ~context.xml~ (now included into `server.xml`, previously used for JNDI settings)
In case you want to fully overwrite such a config file, you can do so by mounting it to the `/opt/config_overrides/` directory of a container.
The `startup.sh` script will then copy (and overwrite) these files to the catalina conf directory before starting tomcat.
@ -186,7 +189,7 @@ Example:
```shell
docker run -it -p 80:8080 \
--mount src="/path/to/my/server.xml",target=/opt/config_overrides/server.xml,type=bind \
docker.osgeo.org/geoserver:2.25.2
docker.osgeo.org/geoserver:2.26.2
```
## How to enable HTTPS?
@ -199,6 +202,15 @@ variables:
* ``HTTPS_KEYSTORE_PASSWORD`` (defaults to `changeit`)
* ``HTTPS_KEY_ALIAS`` (defaults to `server`)
## How to run it as a non-privileged user ?
It is usually considered a good practice to run the containers as a non-privileged user (not `root`).
While it runs by default as root, for backwards compatibility reasons, several environment variables allow you to change this behaviour:
- `RUN_UNPRIVILEGED=true`: run as unprivileged user `tomcat`. Default uid:gid are 999:999
- `RUN_WITH_USER_UID` allows you to set `tomcat`'s uid. By default this is 999.
- `RUN_WITH_USER_GID` allows you to set `tomcat`'s gid. By default this is the same as the uid.
- `CHANGE_OWNERSHIP_ON_FOLDERS` sets a space-separated list of folders on which a `chmod -R` will be run, changing the ownership of those folders to the `tomcat` user (defaults to `"/opt $GEOSERVER_DATA_DIR"`).
## How to use the docker-compose demo?
The ``docker-compose-demo.yml`` to build with your own data directory and extensions.
@ -221,24 +233,31 @@ Following is the list of the all the environment variables that can be passed do
| CORS_ENABLED | CORS enabled configuration | `false` |
| CORS_ALLOWED_ORIGINS | CORS origins configuration | `*` |
| CORS_ALLOWED_METHODS | CORS method configuration | `GET,POST,PUT,DELETE,HEAD,OPTIONS` |
| CORS_ALLOWED_HEADERS | CORS headers configuration | `*` |
| CORS_ALLOWED_HEADERS | CORS headers configuration | `Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers` |
| DEBIAN_FRONTEND | Configures the Debian package manager frontend | `noninteractive`|
| CATALINA_OPTS | Catalina options. Check [ref](https://www.baeldung.com/tomcat-catalina_opts-vs-java_opts) | `-Djava.awt.headless=true` |
| GEOSERVER_DATA_DIR | Geoserver data directory location | `/opt/geoserver_data/` |
| GEOSERVER_REQUIRE_FILE | Geoserver configuration used interally | `/opt/geoserver_data/global.xml` |
| GEOSERVER_REQUIRE_FILE | Path to a file that will be passed to GeoServer. If this file does not exist, GeoServer won't start. | |
| SET_GEOSERVER_REQUIRE_FILE | If set to true, the GEOSERVER_REQUIRE_FILE will be automatically set to `$GEOSERVER_DATA_DIR/global.xml` on startup. If GEOSERVER_REQUIRE_FILE is set it will take precedence. | `true` |
| INSTALL_EXTENSIONS | Indicates whether additional GeoServer extensions should be installed | `false` |
| WAR_ZIP_URL | Specifies the URL for a GeoServer Web Archive (WAR) file | |
| STABLE_EXTENSIONS | Specifies stable GeoServer extensions | |
| STABLE_PLUGIN_URL | Specifies the URL for downloading the latest stable GeoServer plugins | `https://build.geoserver.org/geoserver/2.25.x/ext-latest` |
| STABLE_PLUGIN_URL | Specifies the URL for downloading the latest stable GeoServer plugins | `https://build.geoserver.org/geoserver/2.26.x/ext-latest` |
| COMMUNITY_EXTENSIONS | Specifies community-contributed GeoServer extensions | |
| COMMUNITY_PLUGIN_URL | Specifies the URL for downloading the latest community-contributed GeoServer plugins | `https://build.geoserver.org/geoserver/2.25.x/community-latest` |
| COMMUNITY_PLUGIN_URL | Specifies the URL for downloading the latest community-contributed GeoServer plugins | `https://build.geoserver.org/geoserver/2.26.x/community-latest` |
| ADDITIONAL_LIBS_DIR | Sets the directory for additional libraries used by GeoServer | `/opt/additional_libs/` |
| ADDITIONAL_FONTS_DIR | Sets the directory for additional fonts used by GeoServer | `/opt/additional_fonts/` |
| SKIP_DEMO_DATA | Indicates whether to skip the installation of demo data provided by GeoServer | `false` |
| SKIP_DEMO_DATA | Indicates whether to skip the installation of demo data provided by GeoServer. GEOSERVER_REQUIRE_FILE will be ignored if set to true. | `false` |
| ROOT_WEBAPP_REDIRECT | Indicates whether to issue a permanent redirect to the web interface | `false` |
| HEALTHCHECK_URL | URL to the resource / endpoint used for `docker` health checks | `http://localhost:8080/geoserver/web/wicket/resource/org.geoserver.web.GeoServerBasePage/img/logo.png` |
| GEOSERVER_ADMIN_USER | Admin username | |
| GEOSERVER_ADMIN_PASSWORD | Admin password | |
| RUN_UNPRIVILEGED | If set to `true`, runs as an unprivileged user `tomcat` instead of `root`. | `true` |
| RUN_WITH_USER_UID | When running as unprivileged user, sets the uid of this user. Defaults to `999` | `999` |
| RUN_WITH_USER_GID | When running as unprivileged user, sets the gid of this user. Defaults to the same as the uid | `999` |
| CHANGE_OWNERSHIP_ON_FOLDERS | When running as unprivileged user, changes the ownership to this user to these folders | `"/opt /opt/geoserver_data/ /mnt/geoserver_geodata"` |
After the initial setup, it's recommended to remove the `GEOSERVER_ADMIN_USER` and `GEOSERVER_ADMIN_PASSWORD` variable. Otherwise, newly added roles and users may be overwritten by the next time the container is restarted.
The following values cannot really be safely changed (as they are used to download extensions and community modules as the docker image first starts up).
| VAR NAME | DESCRIPTION | SAMPLE VALUE |

View File

@ -7,7 +7,7 @@ OSGeo maintains geoserver-docker.osgeo.org repository for publishing. The result
Build locally:
```shell
docker build -t geoserver-docker.osgeo.org/geoserver:2.25.2 .
docker build -t geoserver-docker.osgeo.org/geoserver:2.26.2 .
```
Login using with osgeo user id:
@ -19,7 +19,7 @@ docker login geoserver-docker.osgeo.org
Push to osgeo repository:
```shell
docker push geoserver-docker.osgeo.org/geoserver:2.25.2
docker push geoserver-docker.osgeo.org/geoserver:2.26.2
```
## How to automate release?
@ -34,10 +34,10 @@ The third, optional, is used to supply the jenkins build number - triggering a n
Examples:
`./release.sh build 2.25.2`
`./release.sh build 2.26.2`
`./release.sh publish 2.25.2`
`./release.sh publish 2.26.2`
`./release.sh buildandpublish 2.25.2`
`./release.sh buildandpublish 2.26.2`
`./release.sh buildandpublish 2.25-SNAPSHOT 1234`
`./release.sh buildandpublish 2.26-SNAPSHOT 1234`

6
SECURITY.md 100644
View File

@ -0,0 +1,6 @@
# Security Policy
Please see the [Security Policy](https://github.com/geoserver/geoserver/security/policy) or our main project for supported versions and procedures.
You may also [find pubished security advisories](https://github.com/geoserver/geoserver/security/advisories) there.

View File

@ -3,13 +3,13 @@
# error out if any statements fail
set -e
MAIN="2.26"
MAIN="2.27"
function usage() {
echo "$0 <mode> <version> [<build>]"
echo ""
echo " mode : The mode. Choose one of 'build', 'publish' or 'buildandpublish'"
echo " version : The released version to build an docker image for (eg: 2.25.2, ${MAIN}-SNAPSHOT, ${MAIN}-RC)"
echo " version : The released version to build an docker image for (eg: 2.25.3, ${MAIN}-SNAPSHOT, ${MAIN}-RC)"
echo " build : Build number (optional)"
}
@ -49,6 +49,9 @@ else
fi
fi
# Prerequisite for Multi-Arch via QEM
# docker run --privileged --rm tonistiigi/binfmt --install all
echo "Release from branch $BRANCH GeoServer $VERSION as $TAG"
# Go up one level to the Dockerfile

View File

@ -4,7 +4,7 @@ services:
build:
context: .
args:
- GEOSERVER_VERSION=2.25.2
- GEOSERVER_VERSION=2.26.2
- CORS_ENABLED=true
- CORS_ALLOWED_METHODS=GET,POST,PUT,HEAD,OPTIONS
ports:
@ -29,7 +29,7 @@ services:
retries: 3
timeout: 20s
postgis:
image: postgis/postgis:16-3.4-alpine@sha256:ccf26626865d7521eb900ab4181730cffa975433fda6c892b8a81dc6b54142e7
image: postgis/postgis:17-3.4-alpine@sha256:5a1dbedac34e0e6663f8b7190d393339571f1cb3ecb2ab2f724524b4f3c7956e
ports:
- "5555:5432"
environment:

View File

@ -21,11 +21,6 @@ function copy_custom_config() {
fi
}
## Skip demo data
if [ "${SKIP_DEMO_DATA}" = "true" ]; then
unset GEOSERVER_REQUIRE_FILE
fi
## Add a permanent redirect (HTTP 301) from the root webapp ("/") to geoserver web interface ("/geoserver/web")
if [ "${ROOT_WEBAPP_REDIRECT}" = "true" ] && [ "${WEBAPP_CONTEXT}" != "" ]; then
if [ ! -d $CATALINA_HOME/webapps/ROOT ]; then
@ -48,11 +43,42 @@ DEFAULT_HEALTHCHECK_URL="http://${DEFAULT_HEALTHCHECK_URL}"
# write the healthcheck URL to a file that geoserver user has access to but is not served by tomcat
echo "${HEALTHCHECK_URL:-$DEFAULT_HEALTHCHECK_URL}" > $CATALINA_HOME/conf/healthcheck_url.txt
# ensure that GEOSERVER_DATA_DIR exists as a directory
if [ ! -e "$GEOSERVER_DATA_DIR" ]; then
mkdir -p $GEOSERVER_DATA_DIR
echo "Created new GeoServer data directory $GEOSERVER_DATA_DIR as it did not exist."
fi
if [ "${SKIP_DEMO_DATA}" = "true" ]; then
# skipping demo data
if [ "$SET_GEOSERVER_REQUIRE_FILE" = true ]; then
echo "SET_GEOSERVER_REQUIRE_FILE will be ignored because SKIP_DEMO_DATA is set to true"
fi
# unset geoserver require file
if [ ! -z "$GEOSERVER_REQUIRE_FILE" ]; then
echo "GEOSERVER_REQUIRE_FILE will be ignored because SKIP_DEMO_DATA is set to true"
unset GEOSERVER_REQUIRE_FILE
fi
else
# using demo data if data dir does not contain geoserver require file
# set geoserver require file to the correct value
if [ "$SET_GEOSERVER_REQUIRE_FILE" = true ]; then
if [ -z "$GEOSERVER_REQUIRE_FILE" ]; then
export GEOSERVER_REQUIRE_FILE="$GEOSERVER_DATA_DIR/global.xml"
else
echo "SET_GEOSERVER_REQUIRE_FILE is ignored because GEOSERVER_REQUIRE_FILE is set to a value"
fi
fi
## install release data directory if needed before starting tomcat
if [ ! -z "$GEOSERVER_REQUIRE_FILE" ] && [ ! -f "$GEOSERVER_REQUIRE_FILE" ]; then
if [ ! -f "$GEOSERVER_REQUIRE_FILE" ]; then
echo "Initialize $GEOSERVER_DATA_DIR from data directory included in geoserver.war"
cp -r $CATALINA_HOME/webapps/geoserver/data/* $GEOSERVER_DATA_DIR
fi
fi
## install GeoServer extensions before starting the tomcat
/opt/install-extensions.sh
@ -167,4 +193,25 @@ if [ -n "$GEOSERVER_ADMIN_PASSWORD" ] && [ -n "$GEOSERVER_ADMIN_USER" ]; then
/bin/sh /opt/update_credentials.sh
fi
# Run as non-privileged user
if [ "${RUN_UNPRIVILEGED}" = "true" ]
then
echo "The server will be run as non-privileged user 'tomcat'"
RUN_WITH_USER_UID=${RUN_WITH_USER_UID:=999}
RUN_WITH_USER_GID=${RUN_WITH_USER_GID:=${RUN_WITH_USER_UID} }
echo "creating user tomcat (${RUN_WITH_USER_UID}:${RUN_WITH_USER_GID})"
addgroup --gid ${RUN_WITH_USER_GID} tomcat && \
adduser --system -u ${RUN_WITH_USER_UID} --gid ${RUN_WITH_USER_GID} \
--no-create-home tomcat
if [ -n "$CHANGE_OWNERSHIP_ON_FOLDERS" ]; then
echo "Changing ownership accordingly ($CHANGE_OWNERSHIP_ON_FOLDERS)"
chown -R tomcat:tomcat $CHANGE_OWNERSHIP_ON_FOLDERS
fi
exec gosu tomcat $CATALINA_HOME/bin/catalina.sh run -Dorg.apache.catalina.connector.RECYCLE_FACADES=true
else
exec $CATALINA_HOME/bin/catalina.sh run -Dorg.apache.catalina.connector.RECYCLE_FACADES=true
fi