Merge pull request #15 from JakobMiksch/readme-formatting

Formatting of README
pull/17/head
Nils Bühner 2023-01-09 10:04:12 +01:00 committed by GitHub
commit 2300f5ed22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 23 deletions

View File

@ -17,23 +17,23 @@ This Dockerfile can be used to create images for all geoserver versions since 2.
To pull an official image use ``docker.osgeo.org/geoserver:{{VERSION}}``, e.g.: To pull an official image use ``docker.osgeo.org/geoserver:{{VERSION}}``, e.g.:
``` ```shell
docker pull docker.osgeo.org/geoserver:2.21.1 docker pull docker.osgeo.org/geoserver:2.21.1
``` ```
Afterwards you can run the pulled image locally with: Afterwards you can run the pulled image locally with:
``` ```shell
docker run -it -p 80:8080 docker.osgeo.org/geoserver:2.21.1 docker run -it -p 80:8080 docker.osgeo.org/geoserver:2.21.1
``` ```
Or if you want to start the container daemonized, use e.g.: Or if you want to start the container daemonized, use e.g.:
``` ```shell
docker run -d -p 80:8080 docker.osgeo.org/geoserver:2.21.1 docker run -d -p 80:8080 docker.osgeo.org/geoserver:2.21.1
``` ```
Check http://localhost/geoserver to see the geoserver page, Check <http://localhost/geoserver> to see the geoserver page,
and login with geoserver default `admin:geoserver` credentials. and login with geoserver default `admin:geoserver` credentials.
**IMPORTANT NOTE:** Please change the default ``geoserver`` and ``master`` passwords. **IMPORTANT NOTE:** Please change the default ``geoserver`` and ``master`` passwords.
@ -44,8 +44,7 @@ For more information see the user-guide [docker installation instructions](https
To use an external folder as your geoserver data directory. To use an external folder as your geoserver data directory.
```shell
```
docker run -it -p 80:8080 \ docker run -it -p 80:8080 \
--mount src="/absolute/path/on/host",target=/opt/geoserver_data/,type=bind \ --mount src="/absolute/path/on/host",target=/opt/geoserver_data/,type=bind \
docker.osgeo.org/geoserver:2.21.1 docker.osgeo.org/geoserver:2.21.1
@ -60,7 +59,7 @@ This image populates ``/opt/geoserver_data/`` with demo data by default. For pro
The environment variable `SKIP_DEMO_DATA` can be set to `true` to create an empty data directory. The environment variable `SKIP_DEMO_DATA` can be set to `true` to create an empty data directory.
``` ```shell
docker run -it -p 80:8080 \ docker run -it -p 80:8080 \
--env SKIP_DEMO_DATA=true \ --env SKIP_DEMO_DATA=true \
docker.osgeo.org/geoserver:2.21.1 docker.osgeo.org/geoserver:2.21.1
@ -81,7 +80,7 @@ The ``startup.sh`` script allows some customization on startup:
Example installing wps and ysld extensions: Example installing wps and ysld extensions:
``` ```shell
docker run -it -p 80:8080 \ docker run -it -p 80:8080 \
--env INSTALL_EXTENSIONS=true --env STABLE_EXTENSIONS="wps,ysld" \ --env INSTALL_EXTENSIONS=true --env STABLE_EXTENSIONS="wps,ysld" \
docker.osgeo.org/geoserver:2.21.1 docker.osgeo.org/geoserver:2.21.1
@ -89,7 +88,7 @@ docker run -it -p 80:8080 \
The list of extensions (taken from SourceForge download page): The list of extensions (taken from SourceForge download page):
``` ```shell
app-schema gdal jp2k ogr-wps web-resource app-schema gdal jp2k ogr-wps web-resource
authkey geofence libjpeg-turbo oracle wmts-multi-dimensional authkey geofence libjpeg-turbo oracle wmts-multi-dimensional
cas geofence-server mapml params-extractor wps-cluster-hazelcast cas geofence-server mapml params-extractor wps-cluster-hazelcast
@ -106,7 +105,7 @@ excel inspire ogr-wfs wcs2_0-eo
If you want to add geoserver extensions/libs, place the respective jar files in a directory and mount it like If you want to add geoserver extensions/libs, place the respective jar files in a directory and mount it like
``` ```shell
docker run -it -p 80:8080 \ docker run -it -p 80:8080 \
--mount src="/dir/with/libs/on/host",target=/opt/additional_libs,type=bind \ --mount src="/dir/with/libs/on/host",target=/opt/additional_libs,type=bind \
docker.osgeo.org/geoserver:2.21.1 docker.osgeo.org/geoserver:2.21.1
@ -116,7 +115,7 @@ docker run -it -p 80:8080 \
If you want to add custom fonts (the base image only contains 26 fonts) by using a mount: If you want to add custom fonts (the base image only contains 26 fonts) by using a mount:
``` ```shell
docker run -it -p 80:8080 \ docker run -it -p 80:8080 \
--mount src="/dir/with/fonts/on/host",target=/opt/additional_fonts,type=bind \ --mount src="/dir/with/fonts/on/host",target=/opt/additional_fonts,type=bind \
docker.osgeo.org/geoserver:2.21.1 docker.osgeo.org/geoserver:2.21.1
@ -130,7 +129,7 @@ docker run -it -p 80:8080 \
To watch ``geoserver.log`` of a running container: To watch ``geoserver.log`` of a running container:
``` ```shell
docker exec -it {CONTAINER_ID} tail -f /opt/geoserver_data/logs/geoserver.log docker exec -it {CONTAINER_ID} tail -f /opt/geoserver_data/logs/geoserver.log
``` ```
@ -142,16 +141,15 @@ Stage geoserver data directory contents into ``geoserver_data``, and any extensi
Run ``docker-compose``: Run ``docker-compose``:
``` ```shell
docker-compose -f docker-compose-demo.yml up --build docker-compose -f docker-compose-demo.yml up --build
``` ```
## How to Build? ## How to Build?
### How to build a local image? ### How to build a local image?
``` ```shell
docker build -t {YOUR_TAG} . docker build -t {YOUR_TAG} .
``` ```
@ -159,13 +157,13 @@ docker build -t {YOUR_TAG} .
After building run using local tag: After building run using local tag:
``` ```shell
docker run -it -p 80:8080 {YOUR_TAG} docker run -it -p 80:8080 {YOUR_TAG}
``` ```
### How to build a specific GeoServer version? ### How to build a specific GeoServer version?
``` ```shell
docker build \ docker build \
--build-arg GS_VERSION={YOUR_VERSION} \ --build-arg GS_VERSION={YOUR_VERSION} \
-t {YOUR_TAG} . -t {YOUR_TAG} .
@ -173,7 +171,7 @@ docker build \
### How to build with custom geoserver data directory? ### How to build with custom geoserver data directory?
``` ```shell
docker build \ docker build \
--build-arg GS_DATA_PATH={RELATIVE_PATH_TO_YOUR_GS_DATA} \ --build-arg GS_DATA_PATH={RELATIVE_PATH_TO_YOUR_GS_DATA} \
-t {YOUR_TAG} . -t {YOUR_TAG} .
@ -185,7 +183,7 @@ docker build \
Yes! Just pass the `--build-arg` param twice, e.g. Yes! Just pass the `--build-arg` param twice, e.g.
``` ```shell
docker build \ docker build \
--build-arg GS_VERSION={VERSION} \ --build-arg GS_VERSION={VERSION} \
--build-arg GS_DATA_PATH={PATH} \ --build-arg GS_DATA_PATH={PATH} \
@ -198,7 +196,7 @@ Put your `*.jar` files (e.g. the WPS extension) in the `additional_libs` folder
**Note:** Similar to the GeoServer data path from above, you can also configure the path to the additional libraries by passing the `ADDITIONAL_LIBS_PATH` argument when building: **Note:** Similar to the GeoServer data path from above, you can also configure the path to the additional libraries by passing the `ADDITIONAL_LIBS_PATH` argument when building:
``` ```shell
docker build \ docker build \
--build-arg ADDITIONAL_LIBS_PATH={RELATIVE_PATH_TO_YOUR_LIBS} --build-arg ADDITIONAL_LIBS_PATH={RELATIVE_PATH_TO_YOUR_LIBS}
-t {YOUR_TAG} . -t {YOUR_TAG} .
@ -211,16 +209,19 @@ docker build \
OSGeo maintains geoserver-docker.osgeo.org repository for publishing. The results are combined into docker.osgeo.org repository alongside other software such as PostGIS. OSGeo maintains geoserver-docker.osgeo.org repository for publishing. The results are combined into docker.osgeo.org repository alongside other software such as PostGIS.
Build locally: Build locally:
```
```shell
docker build -t geoserver-docker.osgeo.org/geoserver:2.21.1 . docker build -t geoserver-docker.osgeo.org/geoserver:2.21.1 .
``` ```
Login using with osgeo user id: Login using with osgeo user id:
```
```shell
docker login geoserver-docker.osgeo.org docker login geoserver-docker.osgeo.org
``` ```
Push to osgeo repository: Push to osgeo repository:
```
```shell
docker push geoserver-docker.osgeo.org/geoserver:2.21.1 docker push geoserver-docker.osgeo.org/geoserver:2.21.1
``` ```