Skip to content

Commit

Permalink
add temporary fixed copy of geoserver-plugin-download.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
derhuerst committed Feb 21, 2025
1 parent e197be9 commit c6ff432
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ LABEL org.opencontainers.image.description="Geoserver, customized with additiona
LABEL org.opencontainers.image.authors="MobiData BW IPL contributors <[email protected]>"
LABEL org.opencontainers.image.source="https://github.com/mobidata-bw/ipl-geoserver"

# We currently depend on our custom fixed download script.
# todo: use the upstream one again once https://github.com/geosolutions-it/docker-geoserver/pull/169 is merged
COPY geoserver-plugin-download.sh /usr/local/bin/geoserver-plugin-download.sh

# The upstream Docker image build process is so involved that, instead of using their built-in plugin mechanism while building the "original" image [0], we rather copy the instructions here. Other than us doing this *after* the original image has been built, we strive to follow the upstream design as closely as possible.
# [0] https://github.com/geosolutions-it/docker-geoserver/blob/fb6a5197b19c60cf9a4b83b440281e2110a021a0/Dockerfile#L46-L50
ARG PLUG_IN_URLS=""
Expand Down
25 changes: 25 additions & 0 deletions geoserver-plugin-download.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

# Note: This is a (temporary) fixed version of the upstream geoserver-plugin-download.sh as submitted in https://github.com/geosolutions-it/docker-geoserver/pull/169.

set -e
set -u

[ "$#" -le "1" ] && ( echo "no plugin urls passed, exiting" ) && exit 0

PLUGIN_INSTALL_PATH=$1

for url in "${@:2}"
do
# support specifying SourceForge URLs without the `/download` part at the end necessary for downloading
if [[ "$url" == *sourceforge* ]]; then
url="$url/download"
fi

wget \
--no-verbose \
-U 'geosolutionsit/geoserver Docker image build' \
-O ./download "$url"
unzip -o ./download -d "${PLUGIN_INSTALL_PATH}"
rm ./download
done

0 comments on commit c6ff432

Please sign in to comment.