mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-08-28 17:57:34 +00:00
+1
-1
@@ -60,7 +60,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
|||||||
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
|
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
|
||||||
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||||
|
|
||||||
ARG MC_HELPER_VERSION=1.9.2
|
ARG MC_HELPER_VERSION=1.9.5
|
||||||
ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/v${MC_HELPER_VERSION}
|
ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/v${MC_HELPER_VERSION}
|
||||||
RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
|
RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
|
||||||
| tar -C /usr/share -zxf - \
|
| tar -C /usr/share -zxf - \
|
||||||
|
|||||||
+5
-1
@@ -162,11 +162,15 @@ case "${TYPE^^}" in
|
|||||||
exec ${SCRIPTS:-/}start-deployLimbo "$@"
|
exec ${SCRIPTS:-/}start-deployLimbo "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
CRUCIBLE)
|
||||||
|
exec "${SCRIPTS:-/}start-deployCrucible" "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
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, PURPUR, CUSTOM,"
|
log " CURSE_INSTANCE, CURSEFORGE, SPONGEVANILLA, PURPUR, CUSTOM,"
|
||||||
log " MAGMA, MOHIST, CATSERVER, AIRPLANE, CANYON, LIMBO"
|
log " MAGMA, MOHIST, CATSERVER, AIRPLANE, CANYON, LIMBO, CRUCIBLE"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# shellcheck source=start-utils
|
||||||
|
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||||||
|
set -o pipefail
|
||||||
|
set -e
|
||||||
|
isDebugging && set -x
|
||||||
|
|
||||||
|
requireVar VANILLA_VERSION
|
||||||
|
: "${CRUCIBLE_RELEASE:=latest}"
|
||||||
|
|
||||||
|
crucibleReleasesUrl=https://api.github.com/repos/CrucibleMC/Crucible/releases
|
||||||
|
if [[ ${CRUCIBLE_RELEASE^^} = LATEST ]]; then
|
||||||
|
crucibleReleaseUrl=${crucibleReleasesUrl}/latest
|
||||||
|
else
|
||||||
|
crucibleReleaseUrl=${crucibleReleasesUrl}/tags/${CRUCIBLE_RELEASE}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! downloadUrl=$(get --json-path "$.assets[?(@.name =~ /Crucible-${VANILLA_VERSION}-.*\.jar/)].browser_download_url" \
|
||||||
|
--accept "application/vnd.github.v3+json" "$crucibleReleaseUrl"); then
|
||||||
|
log "ERROR: failed to access ${CRUCIBLE_RELEASE} release of Crucible"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $downloadUrl = null ]]; then
|
||||||
|
log "ERROR: failed to locate Crucible jar for $VANILLA_VERSION from ${CRUCIBLE_RELEASE}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "Downloading Crucible from $downloadUrl"
|
||||||
|
if ! SERVER=$(get --skip-existing --output-filename -o /data "$downloadUrl"); then
|
||||||
|
log "ERROR: failed to download Crucible jar from $downloadUrl"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
librariesDir=/data/libraries
|
||||||
|
if [ ! -d "$librariesDir" ]; then
|
||||||
|
if ! librariesUrl=$(get --json-path "$.assets[?(@.name == 'libraries.zip')].browser_download_url" \
|
||||||
|
--accept "application/vnd.github.v3+json" "$crucibleReleaseUrl"); then
|
||||||
|
log "ERROR: failed to access ${CRUCIBLE_RELEASE} release of Crucible for libraries"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
log "Downloading Crucible libraries"
|
||||||
|
if ! get -o /tmp/libraries.zip "$librariesUrl"; then
|
||||||
|
log "ERROR: failed to download Crucible libraries from $librariesUrl"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! unzip /tmp/libraries.zip -d "$librariesDir"; then
|
||||||
|
log "ERROR: failed to unzip Crucible libraries"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
rm /tmp/libraries.zip
|
||||||
|
fi
|
||||||
|
|
||||||
|
export SERVER
|
||||||
|
export SKIP_LOG4J_CONFIG=true
|
||||||
|
|
||||||
|
exec "${SCRIPTS:-$(dirname "$0")}/start-setupWorld" "$@"
|
||||||
Reference in New Issue
Block a user