mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-08-30 10:47:15 +00:00
Quieter Paper/Bukkit default configs downloading (#3535)
This commit is contained in:
+1
-1
@@ -48,7 +48,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
|||||||
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
|
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
|
||||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||||
|
|
||||||
ARG MC_HELPER_VERSION=1.46.2
|
ARG MC_HELPER_VERSION=1.47.0
|
||||||
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
|
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
|
||||||
# used for cache busting local copy of mc-image-helper
|
# used for cache busting local copy of mc-image-helper
|
||||||
ARG MC_HELPER_REV=1
|
ARG MC_HELPER_REV=1
|
||||||
|
|||||||
@@ -126,3 +126,7 @@ If you have attached a host directory to the `/data` volume, then you can instal
|
|||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
The Folia type inherits from the Paper type. Paper's variables will override the Folia ones.
|
The Folia type inherits from the Paper type. Paper's variables will override the Folia ones.
|
||||||
|
|
||||||
|
## Extra config
|
||||||
|
|
||||||
|
- `SKIP_DOWNLOAD_DEFAULTS`: when set to "true" startup will entirely skip checking for default Paper/Bukkit/Spigot config files to download
|
||||||
@@ -14,7 +14,9 @@ handleDebugMode
|
|||||||
: "${REPLACE_ENV_VARIABLES_EXCLUDE_PATHS:=}"
|
: "${REPLACE_ENV_VARIABLES_EXCLUDE_PATHS:=}"
|
||||||
: "${PATCH_DEFINITIONS:=}"
|
: "${PATCH_DEFINITIONS:=}"
|
||||||
: "${DEBUG:=false}"
|
: "${DEBUG:=false}"
|
||||||
|
: "${DOWNLOAD_DEFAULTS:=}"
|
||||||
: "${DOWNLOAD_DEFAULT_CONFIGS:=}"
|
: "${DOWNLOAD_DEFAULT_CONFIGS:=}"
|
||||||
|
: "${SKIP_DOWNLOAD_DEFAULTS:=false}"
|
||||||
|
|
||||||
if isTrue "${REPLACE_ENV_IN_PLACE}"; then
|
if isTrue "${REPLACE_ENV_IN_PLACE}"; then
|
||||||
log "Replacing env variables in ${REPLACE_ENV_PATHS} that match the prefix '$REPLACE_ENV_VARIABLE_PREFIX' ..."
|
log "Replacing env variables in ${REPLACE_ENV_PATHS} that match the prefix '$REPLACE_ENV_VARIABLE_PREFIX' ..."
|
||||||
@@ -27,22 +29,28 @@ if isTrue "${REPLACE_ENV_IN_PLACE}"; then
|
|||||||
"${REPLACE_ENV_PATHS[@]}"
|
"${REPLACE_ENV_PATHS[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $DOWNLOAD_DEFAULT_CONFIGS ]]; then
|
if isFalse "$SKIP_DOWNLOAD_DEFAULTS"; then
|
||||||
log "Downloading default configs, if needed"
|
commonArgs=(
|
||||||
if ! mc-image-helper mcopy \
|
--skip-existing
|
||||||
--to /data/config \
|
--skip-up-to-date=false
|
||||||
--skip-existing --skip-up-to-date=false \
|
--quiet-when-skipped
|
||||||
"$DOWNLOAD_DEFAULT_CONFIGS" 2> /dev/null; then
|
--ignore-missing-sources
|
||||||
logWarning "One or more default config files were not available from $DOWNLOAD_DEFAULT_CONFIGS"
|
)
|
||||||
|
if [[ $DOWNLOAD_DEFAULT_CONFIGS ]]; then
|
||||||
|
if ! mc-image-helper mcopy \
|
||||||
|
--to /data/config \
|
||||||
|
"${commonArgs[@]}" \
|
||||||
|
"$DOWNLOAD_DEFAULT_CONFIGS"; then
|
||||||
|
logWarning "One or more default config files were not available from $DOWNLOAD_DEFAULT_CONFIGS"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
if [[ $DOWNLOAD_DEFAULTS ]]; then
|
||||||
if [[ $DOWNLOAD_DEFAULTS ]]; then
|
if ! mc-image-helper mcopy \
|
||||||
log "Downloading default top-level configs, if needed"
|
--to /data \
|
||||||
if ! mc-image-helper mcopy \
|
"${commonArgs[@]}" \
|
||||||
--to /data \
|
"$DOWNLOAD_DEFAULTS"; then
|
||||||
--skip-existing --skip-up-to-date=false \
|
logWarning "One or more default files were not available from $DOWNLOAD_DEFAULTS"
|
||||||
"$DOWNLOAD_DEFAULTS" 2> /dev/null; then
|
fi
|
||||||
logWarning "One or more default files were not available from $DOWNLOAD_DEFAULTS"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user