Sign inSign up

baasgeo/geoserver

By baasgeo

•Updated 8 days ago

GeoServer docker image

Image
1

10K+

baasgeo/geoserver repository overview

GeoServer⁠ is an open source server for sharing geospatial data. This is a docker image that eases setting up a GeoServer for organizations. This image is based on the official Tomcat 9⁠ image.

⁠Installation

Simple pull the image from the docker hub.

$ docker pull baasgeo/geoserver:tagname

Alternatively you can build the image locally

$ git clone https://github.com/baasgeo/docker-geoserver.git
$ cd geoserver-docker
$ docker build -t "baasgeo/geoserver:tagname" .

⁠Quick start

Create a data folder on your host:

$ sudo mkdir /var/geoserver/

then run the container:

$ docker run \
    --name=geoserver \
    --publish=8080:8082 \
    --volume /var/geoserver:/opt/geoserver \
    --memory 4G \
    baasgeo/geoserver:2.18

Point your browser to http://localhost:8080/geoserver and login using GeoServer's default username and password:

  • Username: admin
  • Password: geoserver

⁠How to use different versions

There is mainly one version tag of this image for every minor GeoServer version.

  • 2.16.x -> baasgeo/geoserver:2.16

  • 2.17.x -> baasgeo/geoserver:2.17

  • 2.18.x -> baasgeo/geoserver:2.18

  • 2.19.x -> baasgeo/geoserver:2.19

Patches are applied to the minor version whenever an update of GeoServer is published. Simply update to the latest version by pulling the image again.

$ docker pull baasgeo/geoserver:tagname
$ docker restart geoserver

⁠Configuration

⁠Data volume

This GeoServer container keeps its configuration data at /opt/geoserver which is exposed as volume in the dockerfile. The volume allows for stopping and starting new containers from the same image without losing all the data and custom configuration.

You may want to map this volume to a directory on the host. Volumes can be mounted by passing the -v or --volume flag to the docker run command:

--volume /var/geoserver:/opt/geoserver

This will also ease the upgrade process in the future.

⁠GeoWebcache volume

GeoWebCache cached tiles are stored in a separated directory at /opt/geowebcache and is exposed as volume in the dockerfile. The volume allows for stopping and starting new containers from the same image without losing the tile cache data.

You may want to map this volume to a directory on the host. Volumes can be mounted by passing the -v or --volume flag to the docker run command:

--volume /var/geowebcache:/opt/geowebcache

This will also ease the upgrade process in the future.

⁠Plugins

Several plugins are supplied with the image:

  • authkey: Key authentication security

  • css: CSS Styling cartography

  • csw: Catalog Service for the Web (CSW)

  • dxf: Drawing exchange format (DXF) output

  • excel: Excel output

  • geopkg: GeoPackage output format⁠

  • importer: Importer Core

  • metadata: Layer metadata⁠

  • ogcapi: OGC API⁠

  • pyramid: Image Pyramid coverage format

  • sec-keycloak: Keycloak authentication

  • wps: Web Processing Service (WPS)

Plugins can be selected by using the environment variable PLUGINS and a comma separated list of the desired plugins:

--env PLUGINS=authkey,dxf,excel
⁠Resource constraints

By default, the container has no resource constraints and can use as much of a given resource as the host’s kernel scheduler allows. To control how much memory, or CPU a container can use, apply runtime configuration flags of the docker run command as described here: Runtime options with Memory, CPUs, and GPUs⁠

The container uses the java -XX:+UseContainerSupport flag. The maximum heap memory size is calculated as InitialRAMPercentage = 50%.

⁠Database

GeoServer recommends the usage of a spatial database

⁠PostGIS container (PostgreSQL + GIS Extension)

If you want to use a PostGIS⁠ container, you can link it to this image. You're free to use any PostGIS container. An example with the official postgis⁠ image:

$ docker run -d --name="postgis" postgis/postgis

For further information see Docker Hub⁠

Now start the GeoServer instance by adding the --link option to the docker run command:

--link postgis:postgis

Tag summary

Content type

Image

Digest

sha256:3bcf117f6…

Size

400.8 MB

Last updated

8 days ago

docker pull baasgeo/geoserver:2.28