mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-15 14:52:27 +00:00
Auto-merging via docker-versions-create
CONFLICT (content): Merge conflict in Dockerfile
This commit is contained in:
commit
4a8e416fe1
10 changed files with 72 additions and 8 deletions
|
@ -67,9 +67,9 @@ WORKDIR /data
|
||||||
|
|
||||||
ENV UID=1000 GID=1000 \
|
ENV UID=1000 GID=1000 \
|
||||||
MEMORY="1G" \
|
MEMORY="1G" \
|
||||||
TYPE=VANILLA VERSION=LATEST FORGEVERSION=RECOMMENDED SPONGEBRANCH=STABLE SPONGEVERSION= FABRICVERSION=LATEST LEVEL=world \
|
TYPE=VANILLA VERSION=LATEST \
|
||||||
PVP=true DIFFICULTY=easy ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
ENABLE_RCON=true RCON_PORT=25575 RCON_PASSWORD=minecraft \
|
||||||
LEVEL_TYPE=DEFAULT SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
|
SERVER_PORT=25565 ONLINE_MODE=TRUE SERVER_NAME="Dedicated Server" \
|
||||||
ENABLE_AUTOPAUSE=false AUTOPAUSE_TIMEOUT_EST=3600 AUTOPAUSE_TIMEOUT_KN=120 AUTOPAUSE_TIMEOUT_INIT=600 \
|
ENABLE_AUTOPAUSE=false AUTOPAUSE_TIMEOUT_EST=3600 AUTOPAUSE_TIMEOUT_KN=120 AUTOPAUSE_TIMEOUT_INIT=600 \
|
||||||
AUTOPAUSE_PERIOD=10 AUTOPAUSE_KNOCK_INTERFACE=eth0
|
AUTOPAUSE_PERIOD=10 AUTOPAUSE_KNOCK_INTERFACE=eth0
|
||||||
|
|
||||||
|
|
12
README.md
12
README.md
|
@ -487,6 +487,18 @@ A [Tuinity](https://github.com/Spottedleaf/Tuinity) server, which is a fork of P
|
||||||
|
|
||||||
> **NOTE** only `VERSION=LATEST` is supported
|
> **NOTE** only `VERSION=LATEST` is supported
|
||||||
|
|
||||||
|
## Running a Purpur server
|
||||||
|
|
||||||
|
A [Purpur](https://purpur.pl3x.net/) server, which is "a fork of Paper and Tuinity with the goal of providing new and interesting configuration options".
|
||||||
|
|
||||||
|
-e TYPE=PURPUR
|
||||||
|
|
||||||
|
> NOTE: the `VERSION` variable is used to lookup a build of Purpur to download
|
||||||
|
|
||||||
|
Extra variables:
|
||||||
|
- `PURPUR_BUILD=LATEST` : set a specific Purpur build to use
|
||||||
|
- `FORCE_REDOWNLOAD=false` : set to true to force the located server jar to be re-downloaded
|
||||||
|
|
||||||
## Running a Magma server
|
## Running a Magma server
|
||||||
|
|
||||||
A [Magma](https://magmafoundation.org/) server, which is a combination of Forge and PaperMC, can be used with
|
A [Magma](https://magmafoundation.org/) server, which is a combination of Forge and PaperMC, can be used with
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
. ${SCRIPTS:-/}start-utils
|
. ${SCRIPTS:-/}start-utils
|
||||||
|
|
||||||
|
: ${PROXY:=}
|
||||||
|
: ${RCON_PASSWORD_FILE:=}
|
||||||
|
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
|
|
||||||
#umask 002
|
#umask 002
|
||||||
|
@ -135,10 +140,14 @@ case "${TYPE^^}" in
|
||||||
exec ${SCRIPTS:-/}start-deployCatserver "$@"
|
exec ${SCRIPTS:-/}start-deployCatserver "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
PURPUR)
|
||||||
|
exec ${SCRIPTS:-/}start-deployPurpur "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
log "Invalid type: '$TYPE'"
|
log "Invalid type: '$TYPE'"
|
||||||
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
|
log "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FTBA (multiarch-only),"
|
||||||
log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA,"
|
log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, TUINITY, PURPUR"
|
||||||
log " CUSTOM, MAGMA, MOHIST, CATSERVER"
|
log " CUSTOM, MAGMA, MOHIST, CATSERVER"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
. ${SCRIPTS:-/}start-utils
|
. ${SCRIPTS:-/}start-utils
|
||||||
|
|
||||||
export TYPE=FORGE
|
export TYPE=FORGE
|
||||||
|
: ${FORGEVERSION:=RECOMMENDED}
|
||||||
|
|
||||||
if [[ -z $FORGE_INSTALLER && -z $FORGE_INSTALLER_URL ]]; then
|
if [[ -z $FORGE_INSTALLER && -z $FORGE_INSTALLER_URL ]]; then
|
||||||
norm=$VANILLA_VERSION
|
norm=$VANILLA_VERSION
|
||||||
|
|
|
@ -58,7 +58,7 @@ else
|
||||||
|
|
||||||
log "Removing old PaperMC versions ..."
|
log "Removing old PaperMC versions ..."
|
||||||
paperJarSearchString=${SERVER/$build/[0-9]*}
|
paperJarSearchString=${SERVER/$build/[0-9]*}
|
||||||
find . -name "$paperJarSearchString" ! -name "$SERVER" -delete -print
|
find . -maxdepth 1 -name "$paperJarSearchString" ! -name "$SERVER" -delete -print
|
||||||
|
|
||||||
log "Downloading PaperMC $VANILLA_VERSION (build $build) ..."
|
log "Downloading PaperMC $VANILLA_VERSION (build $build) ..."
|
||||||
curl -fsSL -o "$SERVER" "${zarg[@]}" \
|
curl -fsSL -o "$SERVER" "${zarg[@]}" \
|
||||||
|
|
38
start-deployPurpur
Executable file
38
start-deployPurpur
Executable file
|
@ -0,0 +1,38 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
. ${SCRIPTS:-/}start-utils
|
||||||
|
isDebugging && set -x
|
||||||
|
|
||||||
|
: ${VANILLA_VERSION:?}
|
||||||
|
: ${PURPUR_BUILD:=LATEST}
|
||||||
|
: ${FORCE_REDOWNLOAD:=false}
|
||||||
|
|
||||||
|
if [[ ${PURPUR_BUILD} == LATEST ]]; then
|
||||||
|
PURPUR_BUILD=$(curl -fsSL "https://purpur.pl3x.net/api/v1/purpur/${VANILLA_VERSION}" |
|
||||||
|
jq -r '.builds.latest' || echo "")
|
||||||
|
if [[ -z ${PURPUR_BUILD} ]]; then
|
||||||
|
log "ERROR: Failed to locate a Purpur build for ${VANILLA_VERSION}."
|
||||||
|
log " Please check if a download is available at https://purpur.pl3x.net/downloads/"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
export SERVER="purpur-${VANILLA_VERSION}-${PURPUR_BUILD}.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$SERVER" ] || isTrue "$FORCE_REDOWNLOAD"; then
|
||||||
|
downloadUrl="https://purpur.pl3x.net/api/v1/purpur/${VANILLA_VERSION}/${PURPUR_BUILD}/download"
|
||||||
|
log "Downloading Purpur from $downloadUrl ..."
|
||||||
|
if ! curl -fsSL -o "$SERVER" "$downloadUrl"; then
|
||||||
|
log "ERROR: failed to download from $downloadUrl (status=$?)"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Normalize on Spigot for later operations
|
||||||
|
export TYPE=SPIGOT
|
||||||
|
export SKIP_LOG4J_CONFIG=true
|
||||||
|
|
||||||
|
# Continue to Final Setup
|
||||||
|
exec ${SCRIPTS:-/}start-finalSetupWorld $@
|
|
@ -3,6 +3,8 @@
|
||||||
. ${SCRIPTS:-/}start-utils
|
. ${SCRIPTS:-/}start-utils
|
||||||
|
|
||||||
export TYPE=spongevanilla
|
export TYPE=spongevanilla
|
||||||
|
: ${SPONGEBRANCH:=STABLE}
|
||||||
|
: ${SPONGEVERSION:=}
|
||||||
|
|
||||||
# Parse branch
|
# Parse branch
|
||||||
log "Choosing branch for Sponge"
|
log "Choosing branch for Sponge"
|
||||||
|
|
|
@ -20,7 +20,7 @@ if [ ! -f "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Normalize on Spigot for operations below
|
# Normalize on Spigot for later operations
|
||||||
export TYPE=SPIGOT
|
export TYPE=SPIGOT
|
||||||
|
|
||||||
# Continue to Final Setup
|
# Continue to Final Setup
|
||||||
|
|
|
@ -69,7 +69,7 @@ function customizeServerProps {
|
||||||
setServerProp "max-world-size" "$MAX_WORLD_SIZE"
|
setServerProp "max-world-size" "$MAX_WORLD_SIZE"
|
||||||
setServerProp "level-name" "$LEVEL"
|
setServerProp "level-name" "$LEVEL"
|
||||||
setServerProp "level-seed" "$SEED"
|
setServerProp "level-seed" "$SEED"
|
||||||
setServerProp "pvp" "$PVP"
|
setServerProp "pvp" "${PVP}"
|
||||||
setServerProp "generator-settings" "$GENERATOR_SETTINGS"
|
setServerProp "generator-settings" "$GENERATOR_SETTINGS"
|
||||||
setServerProp "online-mode" "$ONLINE_MODE"
|
setServerProp "online-mode" "$ONLINE_MODE"
|
||||||
setServerProp "allow-flight" "$ALLOW_FLIGHT"
|
setServerProp "allow-flight" "$ALLOW_FLIGHT"
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
set -e
|
set -e
|
||||||
isDebugging && set -x
|
isDebugging && set -x
|
||||||
|
|
||||||
|
: ${LEVEL:=world}
|
||||||
|
export LEVEL
|
||||||
|
|
||||||
if [ $TYPE = "FEED-THE-BEAST" ]; then
|
if [ $TYPE = "FEED-THE-BEAST" ]; then
|
||||||
worldDest=$FTB_DIR/$LEVEL
|
worldDest=$FTB_DIR/$LEVEL
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue