mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-11-26 07:27:37 +00:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72d31efbda | ||
|
|
219b721d7a | ||
|
|
0e2fb80de3 | ||
|
|
56201df6b9 | ||
|
|
9d9e131fe2 | ||
|
|
4fa525ef7b |
No files matched your search
+2
-2
@@ -45,7 +45,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
# renovate: datasource=github-releases packageName=itzg/mc-monitor
|
||||
ARG MC_MONITOR_VERSION=1.21.0
|
||||
ARG MC_MONITOR_VERSION=1.21.1
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
@@ -57,7 +57,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
# renovate: datasource=github-releases packageName=itzg/mc-image-helper versioning=loose
|
||||
ARG MC_HELPER_VERSION=1.78.3
|
||||
ARG MC_HELPER_VERSION=1.80.0
|
||||
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
|
||||
ARG MC_HELPER_REV=1
|
||||
|
||||
@@ -388,13 +388,11 @@ You can enforce the resource pack on clients by setting `RESOURCE_PACK_ENFORCE`
|
||||
|
||||
### Level / World Save Name
|
||||
|
||||
You can either switch between world saves or run multiple containers with different saves by using the `LEVEL` option,
|
||||
where the default is "world":
|
||||
You can switch between world saves by setting `LEVEL`, which maps to the [level-name](https://minecraft.wiki/w/Server.properties#level-name) property. The default is "world":
|
||||
|
||||
docker run -d -e LEVEL=bonus ...
|
||||
|
||||
> **NOTE:** if running multiple containers be sure to either specify a different `-v` host directory for each
|
||||
`LEVEL` in use or don't use `-v` and the container's filesystem will keep things encapsulated.
|
||||
> **NOTE:** Make sure two or more containers are not using the same data volume.
|
||||
|
||||
> **INFO** Refer to the [data directory](../data-directory.md) section for a visual description of where the `$LEVEL` directory is situated.
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
To run this image on a RaspberryPi 3 B+, 4, or newer, use any of the image tags [list in the Java version section](../versions/java.md) that specify `armv7` for the architecture, which includes `itzg/minecraft-server:latest`.
|
||||
|
||||
!!! note
|
||||
|
||||
You may need to lower the memory allocation, such as `-e MEMORY=750m`
|
||||
|
||||
You may need to lower the memory allocation, such as `-e MEMORY=750m`
|
||||
|
||||
!!! note
|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@ mkdocstrings==1.0.8
|
||||
mkdocstrings-python==2.0.11
|
||||
packaging==26.3
|
||||
pathspec==1.1.1
|
||||
platformdirs==4.14.5
|
||||
platformdirs==4.14.8
|
||||
Pygments==2.21.0
|
||||
pymdown-extensions==13.1
|
||||
pymdown-extensions==13.1.2
|
||||
python-dateutil==4.0.0
|
||||
PyYAML==6.0.3
|
||||
PyYAML==6.0.4
|
||||
pyyaml_env_tag==1.1
|
||||
six==1.17.0
|
||||
watchdog==7.1.0
|
||||
zensical==0.1.1
|
||||
watchdog==7.1.1
|
||||
zensical==0.1.3
|
||||
+1
-1
@@ -254,7 +254,7 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>LEVEL</code></td>
|
||||
<td>Maps to <a href="https://minecraft.wiki/w/Server.properties#level-name">the <code>level-name</code> server property</a>. You can either switch between world saves or run multiple containers with different saves by using the LEVEL option</td>
|
||||
<td>Maps to <a href="https://minecraft.wiki/w/Server.properties#level-name">the <code>level-name</code> server property</a>. You can switch between world saves by using the LEVEL option</td>
|
||||
<td><code>world</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
|
||||
+14
-24
@@ -9,38 +9,28 @@ isDebugging && set -x
|
||||
resolveVersion
|
||||
: "${LEAF_BUILD:=LATEST}"
|
||||
|
||||
# Docs at https://api.leafmc.one/docs/swagger-ui/index.html
|
||||
leafApiUrl="https://api.leafmc.one/v2/projects/leaf"
|
||||
leafDownloadsPage="https://www.leafmc.one/download"
|
||||
leafApiUrl="https://dl.leafmc.one/v3/projects/leaf"
|
||||
if [[ "${LEAF_BUILD^^}" == "LATEST" ]]; then
|
||||
LEAF_BUILD=latest
|
||||
fi
|
||||
|
||||
if ! get --exists "${leafApiUrl}/versions/${VERSION}/builds"; then
|
||||
logError "Leaf builds do not exist for ${VERSION}"
|
||||
logError " check ${leafDownloadsPage} for available versions"
|
||||
logError " and set VERSION accordingly"
|
||||
if ! build=$(
|
||||
get --accept application/json \
|
||||
"${leafApiUrl}/versions/${VERSION}/builds/${LEAF_BUILD}"
|
||||
); then
|
||||
logError "Failed to fetch Leaf build ${LEAF_BUILD} for ${VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${LEAF_BUILD^^}" == "LATEST" ]]; then
|
||||
# Get the latest build number from the API, which will be the last object in the builds array
|
||||
if ! buildNumber=$(
|
||||
get --json-path '$.builds[-1].build' "${leafApiUrl}/versions/${VERSION}/builds"
|
||||
); then
|
||||
logError "failed to list Leaf builds for ${VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
LEAF_BUILD="${buildNumber}"
|
||||
fi
|
||||
|
||||
if ! filename=$(
|
||||
get --json-path='$.downloads.primary.name' --json-value-when-missing="" "${leafApiUrl}/versions/${VERSION}/builds/${LEAF_BUILD}"
|
||||
); then
|
||||
logError "Failed to retrieve download filename"
|
||||
if ! filename=$(jq -er '.downloads["server:default"].name | strings | select(test("^[A-Za-z0-9._-]+\\.jar$"))' <<< "$build") ||
|
||||
! downloadUrl=$(jq -er '.downloads["server:default"].url | strings | select(startswith("https://"))' <<< "$build"); then
|
||||
logError "Invalid Leaf download metadata for ${VERSION} build ${LEAF_BUILD}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SERVER="/data/$filename"
|
||||
|
||||
if ! get --skip-existing --log-progress-each -o "${SERVER}" "${leafApiUrl}/versions/${VERSION}/builds/${LEAF_BUILD}/downloads/${filename}"; then
|
||||
if ! get --skip-existing --log-progress-each -o "${SERVER}" "${downloadUrl}"; then
|
||||
logError "Failed to download"
|
||||
exit 1
|
||||
fi
|
||||
@@ -48,4 +38,4 @@ fi
|
||||
export FAMILY=SPIGOT
|
||||
export SERVER
|
||||
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
exec "$(dirname "$0")/start-spiget" "$@"
|
||||
@@ -141,6 +141,12 @@ fi
|
||||
# shellcheck source=start-finalExec-jvmFlags
|
||||
. "$(dirname "$0")/start-finalExec-jvmFlags"
|
||||
|
||||
# Leaf exits on the first start if this file doesn't exist
|
||||
if isType LEAF && [[ ! -e /data/config/leaf-loader.yml ]]; then
|
||||
mkdir -p /data/config
|
||||
touch /data/config/leaf-loader.yml
|
||||
fi
|
||||
|
||||
# Handle GTNH args
|
||||
if isType "GTNH"; then
|
||||
expandedDOpts="${expandedDOpts} -Dfml.readTimeout=180"
|
||||
|
||||
Reference in new issue
Block a user