
heitorcarneiro/geoserverDockerized GeoServer with extensions: Charts, Control Flow, CSS, MongoDB, Monitor, Query Layer, Vector Tiles, Authkey, GWC-S3, JDBC-Metrics, JDBCConfig, JDBCStore, Importer and Importer BDB.
The biggest change is the use of GeoServer 2.15.2, and the JAVA_OPTS.
heitorcarneiro/geoserver:2.15.2.2-java11-hotspot
sh# Tomcat environment ENV GEOSERVER_OPTS "-server -Djava.awt.headless=true \ -Xms128M -Xmx756M \ -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:+UseParallelGC \ -XX:PerfDataSamplingInterval=500 -XX:NewRatio=2 \ -XX:-UseContainerSupport -XX:InitialRAMPercentage=50 -XX:MaxRAMPercentage=70 \ -Dorg.geotools.referencing.forceXY=true -Dfile.encoding=UTF8 -Duser.timezone=GMT -Djavax.servlet.request.encoding=UTF-8 -Djavax.servlet.response.encoding=UTF-8 -Duser.timezone=GMT -Dorg.geotools.shapefile.datetime=true \ -DGEOSERVER_DATA_DIR=${GEOSERVER_DATA_DIR}"
heitorcarneiro/geoserver:2.15.2.2-java11-hotspot-readonly
sh# Tomcat environment ENV GEOSERVER_OPTS "-server -Djava.awt.headless=true \ -Xms128M -Xmx756M -DGEOSERVER_CONSOLE_DISABLED=true \ -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:+UseParallelGC \ -XX:PerfDataSamplingInterval=500 -XX:NewRatio=2 \ -XX:-UseContainerSupport -XX:InitialRAMPercentage=50 -XX:MaxRAMPercentage=70 \ -Dorg.geotools.referencing.forceXY=true -Dfile.encoding=UTF8 -Duser.timezone=GMT -Djavax.servlet.request.encoding=UTF-8 -Djavax.servlet.response.encoding=UTF-8 -Duser.timezone=GMT -Dorg.geotools.shapefile.datetime=true \ -DGEOSERVER_DATA_DIR=${GEOSERVER_DATA_DIR}"
heitorcarneiro/geoserver:2.15.2.2-java11-hotspot-master
sh# Tomcat environment ENV GEOSERVER_OPTS "-server -Djava.awt.headless=true \ -Xms768M -Xmx2048M \ -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:+UseParallelGC \ -XX:PerfDataSamplingInterval=500 -XX:NewRatio=2 \ -XX:-UseContainerSupport -XX:InitialRAMPercentage=50 -XX:MaxRAMPercentage=70 \ -Dorg.geotools.referencing.forceXY=true -Dfile.encoding=UTF8 -Duser.timezone=GMT -Djavax.servlet.request.encoding=UTF-8 -Djavax.servlet.response.encoding=UTF-8 -Duser.timezone=GMT -Dorg.geotools.shapefile.datetime=true \ -DGEOSERVER_DATA_DIR=${GEOSERVER_DATA_DIR}"
heitorcarneiro/geoserver:2.15.2.2-java11-hotspot-slave
sh# Tomcat environment ENV GEOSERVER_OPTS "-server -Djava.awt.headless=true \ -Xms2G -Xmx3G -DGEOSERVER_CONSOLE_DISABLED=true \ -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:+UseParallelGC \ -XX:PerfDataSamplingInterval=500 -XX:NewRatio=2 \ -XX:-UseContainerSupport -XX:InitialRAMPercentage=50 -XX:MaxRAMPercentage=70 \ -Dorg.geotools.referencing.forceXY=true -Dfile.encoding=UTF8 -Duser.timezone=GMT -Djavax.servlet.request.encoding=UTF-8 -Djavax.servlet.response.encoding=UTF-8 -Duser.timezone=GMT -Dorg.geotools.shapefile.datetime=true \ -DGEOSERVER_DATA_DIR=${GEOSERVER_DATA_DIR}"
Active versions with automated builds available on docker registry:
maintenance, 2.15.2 (2.15.2/java11-hotspot.dockerfile)Other experimental (not automated build):
oracle. Uses wnameless/oracle-xe-11g, needs ojdbc7.jar and setting up a database. See the run commands.
h2-vector. Plays nice with hguerra/h2:geodb, and includes sample scripts for docker-compose and systemd.
Get the image:
docker pull heitorcarneiro/geoserver
Run as a service, exposing port 8080 and using a hosted GEOSERVER_DATA_DIR:
docker run -d -p 8080:8080 -v /path/to/local/data_dir:/var/local/geoserver --name=MyGeoServerInstance heitorcarneiro/geoserver
docker-compose:ymlversion: "3" services: db: image: mdillon/postgis:11 restart: always environment: - POSTGRES_USER=geoserver - POSTGRES_PASSWORD=geoserver ports: - "5432:5432" volumes: - "$PWD/postgres-data:/var/lib/postgresql/data" - "$PWD/postgres-backup:/var/lib/postgresql/backup" geoserver: image: heitorcarneiro/geoserver:2.15.2.2-java11-hotspot restart: always environment: - CATALINA_OPTS="-Djava.awt.headless=true -server -Xms512M -Xmx512M -DGEOSERVER_DATA_DIR=/var/local/geoserver" ports: - "8080:8080" volumes: - "$PWD/geoserver-data:/var/local/geoserver" - "$PWD/geoservermaster-logs:/usr/local/tomcat/logs" links: - "db:postgis" depends_on: - "db"
mkdir postgres-data && mkdir postgres-backup && mkdir geoserver-data && mkdir geoservermaster-logs
docker-compose up
docker run --name "geoserver" --link "mydb:postgis" --network proxy -p "8080:8080" -v "$PWD/geoserver-data:/var/local/geoserver" -e CATALINA_OPTS="-Djava.awt.headless=true -server -Xms512M -Xmx512M -DGEOSERVER_DATA_DIR=${GEOSERVER_DATA_DIR}" -d geoserver:2.15.2-java11-hotspot
To add extensions to your GeoServer installation, provide a directory with the unzipped extensions separated by directories (one directory per extension):
docker run -d -p 8080:8080 -v /path/to/local/exts_dir:/var/local/geoserver-exts/ --name=MyGeoServerInstance heitorcarneiro/geoserver
You can use the build_exts_dir.sh script together with a extensions configuration file to create your own extensions directory easily.
Warning: The
.jarfiles contained in the extensions directory will be copied to theWEB-INF/libdirectory of the GeoServer installation. Make sure to include only.jarfiles from trusted extensions to avoid security risks.
It is also possible to configure the context path by providing a Catalina configuration directory:
docker run -d -p 8080:8080 -v /path/to/local/data_dir:/var/local/geoserver -v /path/to/local/conf_dir:/usr/local/tomcat/conf/Catalina/localhost --name=MyGeoServerInstance heitorcarneiro/geoserver
See some examples.
See the tomcat logs while running:
docker logs -f MyGeoServerInstance


manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务