mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-06-06 10:49:43 +00:00
Compare commits
21 Commits
1.10.0
...
1.11.0-adopt13
| Author | SHA1 | Date | |
|---|---|---|---|
| 0be8968e7e | |||
| f613228619 | |||
| a5e756c86f | |||
| 957d11655b | |||
| 50c22ac469 | |||
| 81e1cd8cfd | |||
| 8387e9bd26 | |||
| 4afdb289c0 | |||
| fe637353d8 | |||
| 9160501f0a | |||
| 6eba5062ec | |||
| fc96723db1 | |||
| 8d3e461b4c | |||
| fd73417411 | |||
| 1207b9a685 | |||
| e6259bfd9d | |||
| b5e7b952e4 | |||
| ac5b960182 | |||
| 3299dec733 | |||
| 578f06087f | |||
| fb364e8301 |
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
FROM openjdk:8u212-jre-alpine
|
FROM adoptopenjdk/openjdk13:alpine-jre
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ COPY log4j2.xml /tmp/log4j2.xml
|
|||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
|
|
||||||
ENV UID=1000 GID=1000 \
|
ENV UID=1000 GID=1000 \
|
||||||
JVM_XX_OPTS="-XX:+UseG1GC" MEMORY="1G" \
|
MEMORY="1G" \
|
||||||
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= FABRICVERSION=LATEST LEVEL=world \
|
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= FABRICVERSION=LATEST LEVEL=world \
|
||||||
PVP=true DIFFICULTY=easy ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
PVP=true DIFFICULTY=easy ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
||||||
LEVEL_TYPE=DEFAULT SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
|
LEVEL_TYPE=DEFAULT SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
|
||||||
|
|||||||
+55
-43
@@ -4,54 +4,66 @@
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
isDebugging && set -x
|
isDebugging && set -x
|
||||||
|
|
||||||
# PaperMC API v2 docs : https://papermc.io/api/docs/swagger-ui/index.html?configUrl=/api/openapi/swagger-config
|
if [[ $PAPER_DOWNLOAD_URL ]]; then
|
||||||
|
export SERVER=$(getFilenameFromUrl "${PAPER_DOWNLOAD_URL}")
|
||||||
|
|
||||||
build=$(curl -fsSL "https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}" -H "accept: application/json" \
|
if [ -f "$SERVER" ]; then
|
||||||
| jq '.builds[-1]')
|
zarg=(-z "$SERVER")
|
||||||
case $? in
|
fi
|
||||||
0)
|
|
||||||
;;
|
echo "Preparing custom PaperMC jar from $PAPER_DOWNLOAD_URL"
|
||||||
22)
|
|
||||||
versions=$(curl -fsSL "https://papermc.io/api/v2/projects/paper" -H "accept: application/json")
|
curl -fsSL -o "$SERVER" "${zarg[@]}" "${PAPER_DOWNLOAD_URL}"
|
||||||
if [[ $VERSION = LATEST ]]; then
|
else
|
||||||
VANILLA_VERSION=$(echo "$versions" | jq -r '.versions[-1]')
|
# PaperMC API v2 docs : https://papermc.io/api/docs/swagger-ui/index.html?configUrl=/api/openapi/swagger-config
|
||||||
log "WARN: using ${VANILLA_VERSION} since that's the latest provided by PaperMC"
|
|
||||||
# re-execute the current script with the newly computed version
|
build=$(curl -fsSL "https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}" -H "accept: application/json" \
|
||||||
exec $0 "$@"
|
| jq '.builds[-1]')
|
||||||
fi
|
case $? in
|
||||||
log "ERROR: ${VANILLA_VERSION} is not published by PaperMC"
|
0)
|
||||||
log " Set VERSION to one of the following: "
|
;;
|
||||||
log " $(echo "$versions" | jq -r '.versions | join(", ")')"
|
22)
|
||||||
|
versions=$(curl -fsSL "https://papermc.io/api/v2/projects/paper" -H "accept: application/json")
|
||||||
|
if [[ $VERSION = LATEST ]]; then
|
||||||
|
VANILLA_VERSION=$(echo "$versions" | jq -r '.versions[-1]')
|
||||||
|
log "WARN: using ${VANILLA_VERSION} since that's the latest provided by PaperMC"
|
||||||
|
# re-execute the current script with the newly computed version
|
||||||
|
exec $0 "$@"
|
||||||
|
fi
|
||||||
|
log "ERROR: ${VANILLA_VERSION} is not published by PaperMC"
|
||||||
|
log " Set VERSION to one of the following: "
|
||||||
|
log " $(echo "$versions" | jq -r '.versions | join(", ")')"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "ERROR: unknown error while looking up PaperMC version=${VANILLA_VERSION}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
echo "ERROR: failed to lookup PaperMC build from version ${VANILLA_VERSION}"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
fi
|
||||||
*)
|
|
||||||
echo "ERROR: unknown error while looking up PaperMC version=${VANILLA_VERSION}"
|
export SERVER=$(curl -fsSL "https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}/builds/${build}" -H "accept: application/json" \
|
||||||
|
| jq -r '.downloads.application.name')
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
echo "ERROR: failed to lookup PaperMC download file from version=${VANILLA_VERSION} build=${build}"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
fi
|
||||||
esac
|
|
||||||
if [ $? != 0 ]; then
|
|
||||||
echo "ERROR: failed to lookup PaperMC build from version ${VANILLA_VERSION}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
export SERVER=$(curl -fsSL "https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}/builds/${build}" -H "accept: application/json" \
|
if [ -f "$SERVER" ]; then
|
||||||
| jq -r '.downloads.application.name')
|
zarg=(-z "$SERVER")
|
||||||
if [ $? != 0 ]; then
|
fi
|
||||||
echo "ERROR: failed to lookup PaperMC download file from version=${VANILLA_VERSION} build=${build}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "$SERVER" ]; then
|
log "Downloading PaperMC $VANILLA_VERSION (build $build) ..."
|
||||||
zarg=(-z "$SERVER")
|
curl -fsSL -o "$SERVER" "${zarg[@]}" \
|
||||||
fi
|
"https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}/builds/${build}/downloads/${SERVER}" \
|
||||||
|
-H "accept: application/java-archive"
|
||||||
log "Downloading PaperMC $VANILLA_VERSION (build $build) ..."
|
if [ $? != 0 ]; then
|
||||||
curl -fsSL -o "$SERVER" "${zarg[@]}" \
|
echo "ERROR: failed to download PaperMC from version=${VANILLA_VERSION} build=${build} download=${SERVER}"
|
||||||
"https://papermc.io/api/v2/projects/paper/versions/${VANILLA_VERSION}/builds/${build}/downloads/${SERVER}" \
|
exit 1
|
||||||
-H "accept: application/java-archive"
|
fi
|
||||||
if [ $? != 0 ]; then
|
|
||||||
echo "ERROR: failed to download PaperMC from version=${VANILLA_VERSION} build=${build} download=${SERVER}"
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Normalize on Spigot for downstream operations
|
# Normalize on Spigot for downstream operations
|
||||||
|
|||||||
Reference in New Issue
Block a user