Compare commits

..
Author SHA1 Message Date
Geoff Bourne 32abf1614f Auto-merging via docker-versions-create 2020-12-19 08:26:24 -06:00
Geoff Bourne f613228619 Restored support for PAPER_DOWNLOAD_URL
Fixes #687
2020-12-15 20:40:00 -06:00
Geoff Bourne a916cc8320 Auto-merging via docker-versions-create 2020-12-15 14:00:27 -06:00
2 changed files with 57 additions and 44 deletions
+2 -1
View File
@@ -1,10 +1,11 @@
FROM adoptopenjdk:latest FROM ubuntu:18.04
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>" LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
RUN apt-get update \ RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \ && DEBIAN_FRONTEND=noninteractive \
apt-get install -y \ apt-get install -y \
openjdk-8-jre-headless \
imagemagick \ imagemagick \
gosu \ gosu \
curl wget \ curl wget \
+12
View File
@@ -4,6 +4,17 @@
set -o pipefail set -o pipefail
isDebugging && set -x isDebugging && set -x
if [[ $PAPER_DOWNLOAD_URL ]]; then
export SERVER=$(getFilenameFromUrl "${PAPER_DOWNLOAD_URL}")
if [ -f "$SERVER" ]; then
zarg=(-z "$SERVER")
fi
echo "Preparing custom PaperMC jar from $PAPER_DOWNLOAD_URL"
curl -fsSL -o "$SERVER" "${zarg[@]}" "${PAPER_DOWNLOAD_URL}"
else
# PaperMC API v2 docs : https://papermc.io/api/docs/swagger-ui/index.html?configUrl=/api/openapi/swagger-config # PaperMC API v2 docs : https://papermc.io/api/docs/swagger-ui/index.html?configUrl=/api/openapi/swagger-config
build=$(curl -fsSL "https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}" -H "accept: application/json" \ build=$(curl -fsSL "https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}" -H "accept: application/json" \
@@ -53,6 +64,7 @@ if [ $? != 0 ]; then
echo "ERROR: failed to download PaperMC from version=${VANILLA_VERSION} build=${build} download=${SERVER}" echo "ERROR: failed to download PaperMC from version=${VANILLA_VERSION} build=${build} download=${SERVER}"
exit 1 exit 1
fi fi
fi
# Normalize on Spigot for downstream operations # Normalize on Spigot for downstream operations
export TYPE=SPIGOT export TYPE=SPIGOT