Skip to content

Commit

Permalink
Build geoserver.war from vendor/geoserver
Browse files Browse the repository at this point in the history
don't download a war.zip from anywhere
  • Loading branch information
olsen232 committed Jun 17, 2024
1 parent c94bd75 commit 2b17a08
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vendor/geoserver"]
path = vendor/geoserver
url = [email protected]:koordinates/geoserver-plus-kx.git
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ FROM tomcat as download

ARG GS_VERSION=2.25.1
ARG GS_BUILD=release
ARG WAR_ZIP_URL=https://downloads.sourceforge.net/project/geoserver/GeoServer/${GS_VERSION}/geoserver-${GS_VERSION}-war.zip
ARG WAR_FILE=vendor/geoserver/src/web/app/target/geoserver.war
ENV GEOSERVER_VERSION=$GS_VERSION
ENV GEOSERVER_BUILD=$GS_BUILD

WORKDIR /tmp

RUN echo "Downloading GeoServer ${GS_VERSION} ${GS_BUILD}" \
&& wget -q -O /tmp/geoserver.zip $WAR_ZIP_URL \
&& unzip geoserver.zip geoserver.war -d /tmp/ \
COPY ${WAR_FILE} /tmp/geoserver.war

RUN echo "Extracting /tmp/geoserver.war (from ${WAR_FILE})" \
&& unzip -q /tmp/geoserver.war -d /tmp/geoserver \
&& rm /tmp/geoserver.war

Expand Down
21 changes: 21 additions & 0 deletions KOORDINATES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Build geoserver.war
(at `vendor/geoserver/src/web/app/target/geoserver.war`):

```shell
mvn clean install -f vendor/geoserver/src -Dmaven.test.skip=true
```

(tests are currently failing due to koordinates-applicationContext.xml)

# Build docker image

```shell
docker build -t {YOUR_TAG} .
```

# Run

```shell
docker run -it -p 80:8080 {YOUR_TAG}
```

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
> [!IMPORTANT]
> This README.md file covers official geoserver builds. See [KOORDINATES.md](KOORDINATES.md)
# A geoserver docker image

This Dockerfile can be used to create images for all geoserver versions since 2.5.
Expand Down
1 change: 1 addition & 0 deletions vendor/geoserver
Submodule geoserver added at 672e38

0 comments on commit 2b17a08

Please sign in to comment.