Skip to content

Commit 902e34e

Browse files
author
Peter Smythe
committed
Add instructions to BUILD.md on how to package a local release to docker
1 parent b930b9b commit 902e34e

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

BUILD.md

+37
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,40 @@ docker run -it -p 80:8080 \
117117
-t 2.26.x
118118
```
119119

120+
## How to build from your own development releases?
121+
122+
Instead of downloading from sourceforge or build.geoserver.org, you need to package your WAR file locally. Follow the [Building guide](https://docs.geoserver.org/latest/en/developer/maven-guide/index.html#building) for extra details.
123+
124+
```
125+
git clone git://github.com/geoserver/geoserver.git geoserver
126+
cd geoserver/src
127+
# edit files as needed
128+
mvn clean install -P release -DskipTests
129+
```
130+
which results in a WAR file located at: `src/web/app/target/geoserver.war`
131+
132+
First zip up the WAR file: `zip src/web/app/target/geoserver.war geoserver.zip`
133+
and host a temporary webserver e.g.
134+
```
135+
python3 -m http.server 8000
136+
```
137+
then build the docker image, pulling from your locally hosted WAR file, and extensions as needed:
138+
```
139+
docker build \
140+
--build-arg WAR_ZIP_URL=http://host.docker.internal:8000/geoserver.zip \
141+
--build-arg STABLE_PLUGIN_URL=https://downloads.sourceforge.net/project/geoserver/GeoServer/2.26.2/extensions \
142+
--build-arg COMMUNITY_PLUGIN_URL=https://build.geoserver.org/geoserver/2.26.x/community-latest/ \
143+
--build-arg GS_VERSION=2.26-SNAPSHOT \
144+
-t my-2.26.x .
145+
```
146+
147+
**Note:** For Linux only (not macOS nor Windows): you possibly need to add `--add-host=host.docker.internal:host-gateway` to the docker build command above.
148+
149+
Run as usual:
150+
```
151+
docker run -it -p 80:8080 \
152+
--env INSTALL_EXTENSIONS=true \
153+
--env STABLE_EXTENSIONS="ysld" \
154+
--env COMMUNITY_EXTENSIONS="ogcapi" \
155+
-t my-2.26.x
156+
```

0 commit comments

Comments
 (0)