Skip to content

Commit b470f78

Browse files
committed
Break readme into smaller files as build and release instructions are getting longer
1 parent 4d24e62 commit b470f78

File tree

3 files changed

+108
-110
lines changed

3 files changed

+108
-110
lines changed

BUILD.md

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Build Instructions
2+
3+
## How to build a local image?
4+
5+
```shell
6+
docker build -t {YOUR_TAG} .
7+
```
8+
9+
## How to run local build?
10+
11+
After building run using local tag:
12+
13+
```shell
14+
docker run -it -p 80:8080 {YOUR_TAG}
15+
```
16+
17+
## How to build a specific GeoServer version?
18+
19+
```shell
20+
docker build \
21+
--build-arg GS_VERSION={YOUR_VERSION} \
22+
-t {YOUR_TAG} .
23+
```
24+
25+
## How to build with custom geoserver data directory?
26+
27+
```shell
28+
docker build \
29+
--build-arg GS_DATA_PATH={RELATIVE_PATH_TO_YOUR_GS_DATA} \
30+
-t {YOUR_TAG} .
31+
```
32+
33+
**Note:** The passed path **must not** be absolute! Instead, the path should be within the build context (e.g. next to the Dockerfile) and should be passed as a relative path, e.g. `GS_DATA_PATH=./my_data/`
34+
35+
## Can a build use a specific GeoServer version AND custom data?
36+
37+
Yes! Just pass the `--build-arg` param twice, e.g.
38+
39+
```shell
40+
docker build \
41+
--build-arg GS_VERSION={VERSION} \
42+
--build-arg GS_DATA_PATH={PATH} \
43+
-t {YOUR_TAG} .
44+
```
45+
46+
## How to build with additional libs/extensions/plugins?
47+
48+
Put your `*.jar` files (e.g. the WPS extension) in the `additional_libs` folder and build with one of the commands from above! (They will be copied to the GeoServer `WEB-INF/lib` folder during the build.)
49+
50+
**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:
51+
52+
```shell
53+
docker build \
54+
--build-arg ADDITIONAL_LIBS_PATH={RELATIVE_PATH_TO_YOUR_LIBS}
55+
-t {YOUR_TAG} .
56+
```

README.md

+13-110
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ This Dockerfile can be used to create images for all geoserver versions since 2.
1111
* Support extensions
1212
* Support additional libraries
1313

14-
## How to Use
14+
This README.md file covers use of official docker image, additional [build](BULD.md) and [release](RELEASE.md) instructions are available.
1515

16-
### How to run official release?
16+
## How to run official release?
1717

1818
To pull an official image use ``docker.osgeo.org/geoserver:{{VERSION}}``, e.g.:
1919

@@ -40,7 +40,7 @@ and login with geoserver default `admin:geoserver` credentials.
4040

4141
For more information see the user-guide [docker installation instructions](https://docs.geoserver.org/latest/en/user/installation/docker.html).
4242

43-
### How to mount an external folder for use as a data directory
43+
## How to mount an external folder for use as a data directory
4444

4545
To use an external folder as your geoserver data directory.
4646

@@ -53,7 +53,7 @@ docker run -it -p 80:8080 \
5353
An empty data directory will be populated on first use. You can easily update GeoServer while
5454
using the same data directory.
5555

56-
### How to start a GeoServer without sample data?
56+
## How to start a GeoServer without sample data?
5757

5858
This image populates ``/opt/geoserver_data/`` with demo data by default. For production scenarios this is typically not desired.
5959

@@ -65,12 +65,12 @@ docker run -it -p 80:8080 \
6565
docker.osgeo.org/geoserver:2.22.0
6666
```
6767

68-
### How to issue a redirect from the root ("/") to GeoServer web interface ("/geoserver/web")?
68+
## How to issue a redirect from the root ("/") to GeoServer web interface ("/geoserver/web")?
6969

7070
By default, the ROOT webapp is not available which makes requests to the root endpoint "/" return a 404 error.
7171
The environment variable `ROOT_WEBAPP_REDIRECT` can be set to `true` to issue a permanent redirect to the web interface.
7272

73-
### How to download and install additional extensions on startup?
73+
## How to download and install additional extensions on startup?
7474

7575
The ``startup.sh`` script allows some customization on startup:
7676

@@ -101,7 +101,7 @@ dxf importer netcdf vectortiles ysld
101101
excel inspire ogr-wfs wcs2_0-eo
102102
```
103103

104-
### How to install additional extensions from local folder?
104+
## How to install additional extensions from local folder?
105105

106106
If you want to add geoserver extensions/libs, place the respective jar files in a directory and mount it like
107107

@@ -111,7 +111,7 @@ docker run -it -p 80:8080 \
111111
docker.osgeo.org/geoserver:2.22.0
112112
```
113113

114-
### How to add additional fonts to the docker image (e.g. for SLD styling)?
114+
## How to add additional fonts to the docker image (e.g. for SLD styling)?
115115

116116
If you want to add custom fonts (the base image only contains 26 fonts) by using a mount:
117117

@@ -123,17 +123,7 @@ docker run -it -p 80:8080 \
123123

124124
**Note:** Do not change the target value!
125125

126-
## Troubleshooting
127-
128-
### How to watch geoserver.log from host?
129-
130-
To watch ``geoserver.log`` of a running container:
131-
132-
```shell
133-
docker exec -it {CONTAINER_ID} tail -f /opt/geoserver_data/logs/geoserver.log
134-
```
135-
136-
### How to use the docker-compose demo?
126+
## How to use the docker-compose demo?
137127

138128
The ``docker-compose-demo.yml`` to build with your own data directory and extensions.
139129

@@ -145,99 +135,12 @@ Run ``docker-compose``:
145135
docker-compose -f docker-compose-demo.yml up --build
146136
```
147137

148-
## How to Build?
149-
150-
### How to build a local image?
151-
152-
```shell
153-
docker build -t {YOUR_TAG} .
154-
```
155-
156-
### How to run local build?
157-
158-
After building run using local tag:
159-
160-
```shell
161-
docker run -it -p 80:8080 {YOUR_TAG}
162-
```
163-
164-
### How to build a specific GeoServer version?
165-
166-
```shell
167-
docker build \
168-
--build-arg GS_VERSION={YOUR_VERSION} \
169-
-t {YOUR_TAG} .
170-
```
171-
172-
### How to build with custom geoserver data directory?
173-
174-
```shell
175-
docker build \
176-
--build-arg GS_DATA_PATH={RELATIVE_PATH_TO_YOUR_GS_DATA} \
177-
-t {YOUR_TAG} .
178-
```
179-
180-
**Note:** The passed path **must not** be absolute! Instead, the path should be within the build context (e.g. next to the Dockerfile) and should be passed as a relative path, e.g. `GS_DATA_PATH=./my_data/`
181-
182-
### Can a build use a specific GeoServer version AND custom data?
183-
184-
Yes! Just pass the `--build-arg` param twice, e.g.
185-
186-
```shell
187-
docker build \
188-
--build-arg GS_VERSION={VERSION} \
189-
--build-arg GS_DATA_PATH={PATH} \
190-
-t {YOUR_TAG} .
191-
```
192-
193-
### How to build with additional libs/extensions/plugins?
194-
195-
Put your `*.jar` files (e.g. the WPS extension) in the `additional_libs` folder and build with one of the commands from above! (They will be copied to the GeoServer `WEB-INF/lib` folder during the build.)
196-
197-
**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:
198-
199-
```shell
200-
docker build \
201-
--build-arg ADDITIONAL_LIBS_PATH={RELATIVE_PATH_TO_YOUR_LIBS}
202-
-t {YOUR_TAG} .
203-
```
204-
205-
## How to release?
206-
207-
### How to publish official release?
208-
209-
OSGeo maintains geoserver-docker.osgeo.org repository for publishing. The results are combined into docker.osgeo.org repository alongside other software such as PostGIS.
210-
211-
Build locally:
212-
213-
```shell
214-
docker build -t geoserver-docker.osgeo.org/geoserver:2.22.0 .
215-
```
216-
217-
Login using with osgeo user id:
138+
## Troubleshooting
218139

219-
```shell
220-
docker login geoserver-docker.osgeo.org
221-
```
140+
### How to watch geoserver.log from host?
222141

223-
Push to osgeo repository:
142+
To watch ``geoserver.log`` of a running container:
224143

225144
```shell
226-
docker push geoserver-docker.osgeo.org/geoserver:2.22.0
145+
docker exec -it {CONTAINER_ID} tail -f /opt/geoserver_data/logs/geoserver.log
227146
```
228-
229-
### How to automate release?
230-
231-
For CI purposes, the script in the `build` folder is used to simplify those steps.
232-
233-
The variables `DOCKERUSER` and `DOCKERPASSWORD` have to be set with valid credentials before this script can push the image to the osgeo repo.
234-
235-
You need to pass the version as first and the type as second argument, where type has to be one of `build`, `publish` or `buildandpublish`.
236-
237-
Examples:
238-
239-
`./release.sh 2.22.1 build`
240-
241-
`./release.sh 2.22.0 publish`
242-
243-
`./release.sh 2.22.1 buildandpublish`

RELEASE.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Release Process
2+
3+
## How to publish official release?
4+
5+
OSGeo maintains geoserver-docker.osgeo.org repository for publishing. The results are combined into docker.osgeo.org repository alongside other software such as PostGIS.
6+
7+
Build locally:
8+
9+
```shell
10+
docker build -t geoserver-docker.osgeo.org/geoserver:2.22.0 .
11+
```
12+
13+
Login using with osgeo user id:
14+
15+
```shell
16+
docker login geoserver-docker.osgeo.org
17+
```
18+
19+
Push to osgeo repository:
20+
21+
```shell
22+
docker push geoserver-docker.osgeo.org/geoserver:2.22.0
23+
```
24+
25+
## How to automate release?
26+
27+
For CI purposes, the script in the `build` folder is used to simplify those steps.
28+
29+
The variables `DOCKERUSER` and `DOCKERPASSWORD` have to be set with valid credentials before this script can push the image to the osgeo repo.
30+
31+
You need to pass the version as first and the type as second argument, where type has to be one of `build`, `publish` or `buildandpublish`.
32+
33+
Examples:
34+
35+
`./release.sh 2.22.1 build`
36+
37+
`./release.sh 2.22.0 publish`
38+
39+
`./release.sh 2.22.1 buildandpublish`

0 commit comments

Comments
 (0)