mirror of
https://github.com/itzg/docker-minecraft-server
synced 2025-03-04 23:27:17 +00:00
mc: Download Bukkit and Spigot from getbukkit.org
This commit is contained in:
parent
c288557188
commit
2627317e03
2 changed files with 14 additions and 14 deletions
|
@ -31,7 +31,6 @@ EXPOSE 25565 25575
|
||||||
|
|
||||||
ADD https://github.com/itzg/restify/releases/download/1.0.4/restify_linux_amd64 /usr/local/bin/restify
|
ADD https://github.com/itzg/restify/releases/download/1.0.4/restify_linux_amd64 /usr/local/bin/restify
|
||||||
ADD https://github.com/itzg/rcon-cli/releases/download/1.3/rcon-cli_linux_amd64 /usr/local/bin/rcon-cli
|
ADD https://github.com/itzg/rcon-cli/releases/download/1.3/rcon-cli_linux_amd64 /usr/local/bin/rcon-cli
|
||||||
COPY start* /
|
|
||||||
COPY mcadmin.jq /usr/share
|
COPY mcadmin.jq /usr/share
|
||||||
RUN chmod +x /usr/local/bin/*
|
RUN chmod +x /usr/local/bin/*
|
||||||
|
|
||||||
|
@ -47,3 +46,5 @@ ENV UID=1000 GID=1000 \
|
||||||
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= LEVEL=world \
|
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= 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 GENERATOR_SETTINGS= WORLD= MODPACK= SERVER_PORT=25565 ONLINE_MODE=TRUE CONSOLE=true
|
LEVEL_TYPE=DEFAULT GENERATOR_SETTINGS= WORLD= MODPACK= SERVER_PORT=25565 ONLINE_MODE=TRUE CONSOLE=true
|
||||||
|
|
||||||
|
COPY start* /
|
||||||
|
|
|
@ -19,31 +19,30 @@ function downloadSpigot {
|
||||||
*BUKKIT|*bukkit)
|
*BUKKIT|*bukkit)
|
||||||
match="Craftbukkit"
|
match="Craftbukkit"
|
||||||
downloadUrl=${BUKKIT_DOWNLOAD_URL}
|
downloadUrl=${BUKKIT_DOWNLOAD_URL}
|
||||||
|
getbukkitFlavor=craftbukkit
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
match="Spigot"
|
match="Spigot"
|
||||||
downloadUrl=${SPIGOT_DOWNLOAD_URL}
|
downloadUrl=${SPIGOT_DOWNLOAD_URL}
|
||||||
|
getbukkitFlavor=spigot
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ -z $downloadUrl ]]; then
|
if [[ -z $downloadUrl ]]; then
|
||||||
downloadUrl=$(restify --class=jar-div https://mcadmin.net/ | \
|
downloadUrl="https://cdn.getbukkit.org/${getbukkitFlavor}/${getbukkitFlavor}-${VERSION}.jar"
|
||||||
jq --arg version "$match $VANILLA_VERSION" -r -f /usr/share/mcadmin.jq)
|
|
||||||
if [[ -z $downloadUrl ]]; then
|
|
||||||
echo "ERROR: Version $VANILLA_VERSION is not supported for $TYPE"
|
|
||||||
echo " Refer to https://mcadmin.net/ for supported versions"
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Downloading $match"
|
echo "Downloading $match ..."
|
||||||
curl -kfsSL -o $SERVER "$downloadUrl"
|
if ! curl -fsSL -o $SERVER "$downloadUrl"; then
|
||||||
status=$?
|
cat <<EOF
|
||||||
if [ ! -f $SERVER ]; then
|
|
||||||
echo "ERROR: failed to download from $downloadUrl (status=$status)"
|
ERROR: failed to download from $downloadUrl
|
||||||
|
Visit https://getbukkit.org/download/${getbukkitFlavor} to lookup the
|
||||||
|
exact version, such as 1.4.6-R0.4-SNAPSHOT
|
||||||
|
|
||||||
|
EOF
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue