-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add temporary fixed copy of geoserver-plugin-download.sh
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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="" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |