mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-03-29 09:52:46 +00:00
Compare commits
13 Commits
misc/rcon-
...
2025.9.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99f31d5a9b | ||
|
|
155b478ee1 | ||
|
|
6faa3a379d | ||
|
|
fc6fcb68e5 | ||
|
|
0da12d1518 | ||
|
|
a9b4e67d22 | ||
|
|
75016e948b | ||
|
|
d72db19b4e | ||
|
|
cad2bc1ef6 | ||
|
|
c29430ffc5 | ||
|
|
7c05109ffa | ||
|
|
ce0f1599de | ||
|
|
57a3fe7641 |
2
.github/workflows/build-multiarch.yml
vendored
2
.github/workflows/build-multiarch.yml
vendored
@@ -119,7 +119,7 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v5.0.0
|
||||||
with:
|
with:
|
||||||
# for build-files step
|
# for build-files step
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|||||||
2
.github/workflows/verify-pr.yml
vendored
2
.github/workflows/verify-pr.yml
vendored
@@ -50,7 +50,7 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v5.0.0
|
||||||
with:
|
with:
|
||||||
# for build-files step
|
# for build-files step
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|||||||
@@ -43,12 +43,12 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
|||||||
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \
|
--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
|
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||||
|
|
||||||
ARG MC_SERVER_RUNNER_VERSION=1.13.1
|
ARG MC_SERVER_RUNNER_VERSION=1.13.3
|
||||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
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.48.10
|
ARG MC_HELPER_VERSION=1.48.11
|
||||||
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
|
||||||
|
|||||||
@@ -136,8 +136,4 @@ When `MEMORY` is greater than or equal to 12G, then the Aikar flags will be adju
|
|||||||
|
|
||||||
[MeowIce has created an updated set of JVM flags](https://github.com/MeowIce/meowice-flags?tab=readme-ov-file#why-would-i-have-to-switch-) based on Aikar's flags but with support for optimizations for Java 17 and above
|
[MeowIce has created an updated set of JVM flags](https://github.com/MeowIce/meowice-flags?tab=readme-ov-file#why-would-i-have-to-switch-) based on Aikar's flags but with support for optimizations for Java 17 and above
|
||||||
|
|
||||||
The set of flags documented there can be added using
|
The set of flags documented there can be added by setting the environment variable `USE_MEOWICE_FLAGS` to `true`. There is an optional `USE_MEOWICE_GRAALVM_FLAGS` variable to enable GraalVM specific optimizations, defaults to `FALSE`.
|
||||||
|
|
||||||
-e USE_MEOWICE_FLAGS=true
|
|
||||||
|
|
||||||
There is an optional `USE_MEOWICE_GRAALVM_FLAGS` variable to enable GraalVM specific optimizations, defaults to `TRUE` if USE_MEOWICE_GRAALVM_FLAGS is `TRUE`
|
|
||||||
|
|||||||
@@ -414,6 +414,9 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
|
|||||||
| HARDCORE | [hardcore](https://minecraft.wiki/w/Server.properties#hardcore) |
|
| HARDCORE | [hardcore](https://minecraft.wiki/w/Server.properties#hardcore) |
|
||||||
| HIDE_ONLINE_PLAYERS | [hide-online-players](https://minecraft.wiki/w/Server.properties#hide-online-players) |
|
| HIDE_ONLINE_PLAYERS | [hide-online-players](https://minecraft.wiki/w/Server.properties#hide-online-players) |
|
||||||
| LOG_IPS | [log-ips](https://minecraft.wiki/w/Server.properties#log-ips) |
|
| LOG_IPS | [log-ips](https://minecraft.wiki/w/Server.properties#log-ips) |
|
||||||
|
| MANAGEMENT_SERVER_ENABLED | [management-server-enabled](https://minecraft.wiki/w/Server.properties#management-server-enabled) |
|
||||||
|
| MANAGEMENT_SERVER_HOST | [management-server-host](https://minecraft.wiki/w/Server.properties#management-server-host) |
|
||||||
|
| MANAGEMENT_SERVER_PORT | [management-server-port](https://minecraft.wiki/w/Server.properties#management-server-port) |
|
||||||
| MAX_CHAINED_NEIGHBOR_UPDATES | [max-chained-neighbor-updates](https://minecraft.wiki/w/Server.properties#max-chained-neighbor-updates) |
|
| MAX_CHAINED_NEIGHBOR_UPDATES | [max-chained-neighbor-updates](https://minecraft.wiki/w/Server.properties#max-chained-neighbor-updates) |
|
||||||
| MAX_PLAYERS | [max-players](https://minecraft.wiki/w/Server.properties#max-players) |
|
| MAX_PLAYERS | [max-players](https://minecraft.wiki/w/Server.properties#max-players) |
|
||||||
| MAX_TICK_TIME | [max-tick-time](https://minecraft.wiki/w/Server.properties#max-tick-time) |
|
| MAX_TICK_TIME | [max-tick-time](https://minecraft.wiki/w/Server.properties#max-tick-time) |
|
||||||
@@ -433,6 +436,7 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
|
|||||||
| SIMULATION_DISTANCE | [simulation-distance](https://minecraft.wiki/w/Server.properties#simulation-distance) |
|
| SIMULATION_DISTANCE | [simulation-distance](https://minecraft.wiki/w/Server.properties#simulation-distance) |
|
||||||
| SPAWN_MONSTERS | [spawn-monsters](https://minecraft.wiki/w/Server.properties#spawn-monsters) |
|
| SPAWN_MONSTERS | [spawn-monsters](https://minecraft.wiki/w/Server.properties#spawn-monsters) |
|
||||||
| SPAWN_PROTECTION | [spawn-protection](https://minecraft.wiki/w/Server.properties#spawn-protection) |
|
| SPAWN_PROTECTION | [spawn-protection](https://minecraft.wiki/w/Server.properties#spawn-protection) |
|
||||||
|
| STATUS_HEARTBEAT_INTERVAL | [status-heartbeat-interval](https://minecraft.wiki/w/Server.properties#status-heartbeat-interval) |
|
||||||
| SYNC_CHUNK_WRITES | [sync-chunk-writes](https://minecraft.wiki/w/Server.properties#sync-chunk-writes) |
|
| SYNC_CHUNK_WRITES | [sync-chunk-writes](https://minecraft.wiki/w/Server.properties#sync-chunk-writes) |
|
||||||
| USE_NATIVE_TRANSPORT | [use-native-transport](https://minecraft.wiki/w/Server.properties#use-native-transport) |
|
| USE_NATIVE_TRANSPORT | [use-native-transport](https://minecraft.wiki/w/Server.properties#use-native-transport) |
|
||||||
| VIEW_DISTANCE | [view-distance](https://minecraft.wiki/w/Server.properties#view-distance) |
|
| VIEW_DISTANCE | [view-distance](https://minecraft.wiki/w/Server.properties#view-distance) |
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
mkdocs-material == 9.6.16
|
mkdocs-material == 9.6.18
|
||||||
mkdocs-autorefs == 1.4.2
|
mkdocs-autorefs == 1.4.3
|
||||||
mkdocstrings[python] == 0.30.0
|
mkdocstrings[python] == 0.30.0
|
||||||
mkdocs-literate-nav == 0.6.2
|
mkdocs-literate-nav == 0.6.2
|
||||||
mdx-gh-links == 0.4
|
mdx-gh-links == 0.4
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ services:
|
|||||||
EULA: true
|
EULA: true
|
||||||
ALLOW_FLIGHT: true
|
ALLOW_FLIGHT: true
|
||||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||||
|
CF_API_KEY: ${CF_API_KEY}
|
||||||
CF_SLUG: craftoria
|
CF_SLUG: craftoria
|
||||||
MOTD: |
|
MOTD: |
|
||||||
A %TYPE% server on %VERSION%
|
A %TYPE% server on %VERSION%
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ services:
|
|||||||
EULA: "TRUE"
|
EULA: "TRUE"
|
||||||
TYPE: MOHIST
|
TYPE: MOHIST
|
||||||
VERSION: 1.12.2
|
VERSION: 1.12.2
|
||||||
DEBUG: "true"
|
MOHIST_BUILD: 347
|
||||||
volumes:
|
volumes:
|
||||||
- data:/data
|
- data:/data
|
||||||
|
|
||||||
|
|||||||
@@ -184,6 +184,12 @@
|
|||||||
},
|
},
|
||||||
"valhelsia-5": {
|
"valhelsia-5": {
|
||||||
"excludes": ["modernfix"]
|
"excludes": ["modernfix"]
|
||||||
|
},
|
||||||
|
"mc-eternal-2": {
|
||||||
|
"forceIncludes": [
|
||||||
|
"particular-reforged",
|
||||||
|
"mob-player-animator"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,9 @@
|
|||||||
"level-seed": {"env": "SEED"},
|
"level-seed": {"env": "SEED"},
|
||||||
"level-type": {"env": "LEVEL_TYPE"},
|
"level-type": {"env": "LEVEL_TYPE"},
|
||||||
"log-ips": {"env": "LOG_IPS"},
|
"log-ips": {"env": "LOG_IPS"},
|
||||||
|
"management-server-enabled": {"env": "MANAGEMENT_SERVER_ENABLED"},
|
||||||
|
"management-server-host": {"env": "MANAGEMENT_SERVER_HOST"},
|
||||||
|
"management-server-port": {"env": "MANAGEMENT_SERVER_PORT"},
|
||||||
"max-build-height": {"env": "MAX_BUILD_HEIGHT"},
|
"max-build-height": {"env": "MAX_BUILD_HEIGHT"},
|
||||||
"max-chained-neighbor-updates": {"env": "MAX_CHAINED_NEIGHBOR_UPDATES"},
|
"max-chained-neighbor-updates": {"env": "MAX_CHAINED_NEIGHBOR_UPDATES"},
|
||||||
"max-players": {"env": "MAX_PLAYERS"},
|
"max-players": {"env": "MAX_PLAYERS"},
|
||||||
@@ -61,6 +64,7 @@
|
|||||||
"spawn-monsters": {"env": "SPAWN_MONSTERS"},
|
"spawn-monsters": {"env": "SPAWN_MONSTERS"},
|
||||||
"spawn-npcs": {"env": "SPAWN_NPCS"},
|
"spawn-npcs": {"env": "SPAWN_NPCS"},
|
||||||
"spawn-protection": {"env": "SPAWN_PROTECTION"},
|
"spawn-protection": {"env": "SPAWN_PROTECTION"},
|
||||||
|
"status-heartbeat-interval": {"env": "STATUS_HEARTBEAT_INTERVAL"},
|
||||||
"sync-chunk-writes": {"env": "SYNC_CHUNK_WRITES"},
|
"sync-chunk-writes": {"env": "SYNC_CHUNK_WRITES"},
|
||||||
"use-native-transport": {"env": "USE_NATIVE_TRANSPORT"},
|
"use-native-transport": {"env": "USE_NATIVE_TRANSPORT"},
|
||||||
"view-distance": {"env": "VIEW_DISTANCE"},
|
"view-distance": {"env": "VIEW_DISTANCE"},
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ fi
|
|||||||
|
|
||||||
if isTrue "${DEBUG_MEMORY:-false}"; then
|
if isTrue "${DEBUG_MEMORY:-false}"; then
|
||||||
log "Memory usage and availability (in MB)"
|
log "Memory usage and availability (in MB)"
|
||||||
uname -parts
|
uname -pars
|
||||||
free -m
|
free -m
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -14,38 +14,39 @@ mohistType="${TYPE,,}"
|
|||||||
mohistApiUrl="https://api.mohistmc.com/project/${mohistType}"
|
mohistApiUrl="https://api.mohistmc.com/project/${mohistType}"
|
||||||
mohistDownloadsPage="https://mohistmc.com/downloadSoftware?project=${mohistType}"
|
mohistDownloadsPage="https://mohistmc.com/downloadSoftware?project=${mohistType}"
|
||||||
|
|
||||||
if ! get --exists "${mohistApiUrl}/${VERSION}/builds"; then
|
if [[ "${MOHIST_BUILD}" != "lastSuccessfulBuild" ]] && [[ "${VERSION,,}" != latest ]] && [[ -f "/data/${mohistType}-${VERSION}-${MOHIST_BUILD}-server.jar" ]]; then
|
||||||
logError "${mohistType} builds do not exist for ${VERSION}"
|
log "Skipping Mohist build lookup since server jar exists"
|
||||||
logError " check ${mohistDownloadsPage} for available versions"
|
SERVER="/data/${mohistType}-${VERSION}-${MOHIST_BUILD}-server.jar"
|
||||||
logError " and set VERSION accordingly"
|
else
|
||||||
exit 1
|
if ! get --exists "${mohistApiUrl}/${VERSION}/builds"; then
|
||||||
fi
|
logError "${mohistType} builds do not exist for ${VERSION}"
|
||||||
|
logError " check ${mohistDownloadsPage} for available versions"
|
||||||
if [[ "${MOHIST_BUILD}" == "lastSuccessfulBuild" ]]; then
|
logError " and set VERSION accordingly"
|
||||||
# Get the latest build number from the API
|
|
||||||
if ! buildNumber=$(
|
|
||||||
get --json-path '$[0].id' "${mohistApiUrl}/${VERSION}/builds"
|
|
||||||
); then
|
|
||||||
logError "failed to list ${mohistType} builds for ${VERSION}"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
MOHIST_BUILD="${buildNumber}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
downloadUrl="${mohistApiUrl}/${VERSION}/builds/${MOHIST_BUILD}/download"
|
if [[ "${MOHIST_BUILD}" == "lastSuccessfulBuild" ]]; then
|
||||||
|
# Get the latest build number from the API
|
||||||
|
if ! buildNumber=$(
|
||||||
|
get --json-path '$[0].id' "${mohistApiUrl}/${VERSION}/builds"
|
||||||
|
); then
|
||||||
|
logError "failed to list ${mohistType} builds for ${VERSION}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
MOHIST_BUILD="${buildNumber}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -z "${downloadUrl}" ]]; then
|
downloadUrl="${mohistApiUrl}/${VERSION}/builds/${MOHIST_BUILD}/download"
|
||||||
logError "Could not find build ${MOHIST_BUILD} for version ${VERSION}"
|
|
||||||
logError " check ${mohistDownloadsPage} for available versions"
|
|
||||||
logError " and set VERSION accordingly"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
SERVER="/data/${mohistType}-${VERSION}-${MOHIST_BUILD}-server.jar"
|
if [[ -z "${downloadUrl}" ]]; then
|
||||||
|
logError "Could not find build ${MOHIST_BUILD} for version ${VERSION}"
|
||||||
|
logError " check ${mohistDownloadsPage} for available versions"
|
||||||
|
logError " and set VERSION accordingly"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -f "${SERVER}" ]; then
|
SERVER="/data/${mohistType}-${VERSION}-${MOHIST_BUILD}-server.jar"
|
||||||
log "Downloading ${mohistType^} build ${MOHIST_BUILD} for ${VERSION}"
|
get --skip-existing -o "${SERVER}" "${downloadUrl}"
|
||||||
get -o "${SERVER}" "${downloadUrl}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${mohistType}" == "mohist" ]]; then
|
if [[ "${mohistType}" == "mohist" ]]; then
|
||||||
|
|||||||
@@ -151,16 +151,19 @@ if isTrue "${ENABLE_JMX}"; then
|
|||||||
log "JMX is enabled. Make sure you have port forwarding for ${JMX_PORT}"
|
log "JMX is enabled. Make sure you have port forwarding for ${JMX_PORT}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
: "${USE_AIKAR_FLAGS:=false}"
|
||||||
|
: "${USE_MEOWICE_FLAGS:=false}"
|
||||||
|
: "${USE_MEOWICE_GRAALVM_FLAGS:=false}"
|
||||||
|
|
||||||
if isTrue "${USE_MEOWICE_FLAGS}"; then
|
if isTrue "${USE_MEOWICE_FLAGS}"; then
|
||||||
java_major_version=$(mc-image-helper java-release)
|
java_major_version=$(mc-image-helper java-release)
|
||||||
if [[ $java_major_version -gt 16 ]]; then
|
if [[ $java_major_version -gt 16 ]]; then
|
||||||
USE_MEOWICE_GRAALVM_FLAGS="${USE_MEOWICE_GRAALVM_FLAGS:-TRUE}"
|
|
||||||
log "Java version $java_major_version using MeowIce's flags for Java 17+"
|
log "Java version $java_major_version using MeowIce's flags for Java 17+"
|
||||||
else
|
else
|
||||||
log "Your Java version is $java_major_version, MeowIce's flags are for Java 17+ falling back to Aikar's"
|
log "Your Java version is $java_major_version, MeowIce's flags are for Java 17+ falling back to Aikar's"
|
||||||
USE_MEOWICE_FLAGS=FALSE
|
USE_MEOWICE_FLAGS=FALSE
|
||||||
|
USE_AIKAR_FLAGS=TRUE
|
||||||
fi
|
fi
|
||||||
USE_AIKAR_FLAGS=TRUE
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if isTrue "${USE_AIKAR_FLAGS}"; then
|
if isTrue "${USE_AIKAR_FLAGS}"; then
|
||||||
@@ -221,6 +224,7 @@ fi
|
|||||||
if isTrue "${USE_MEOWICE_FLAGS}"; then
|
if isTrue "${USE_MEOWICE_FLAGS}"; then
|
||||||
JVM_XX_OPTS="${JVM_XX_OPTS}
|
JVM_XX_OPTS="${JVM_XX_OPTS}
|
||||||
-XX:+UnlockDiagnosticVMOptions
|
-XX:+UnlockDiagnosticVMOptions
|
||||||
|
-XX:+UnlockExperimentalVMOptions
|
||||||
-XX:G1SATBBufferEnqueueingThresholdPercent=30
|
-XX:G1SATBBufferEnqueueingThresholdPercent=30
|
||||||
-XX:G1ConcMarkStepDurationMillis=5
|
-XX:G1ConcMarkStepDurationMillis=5
|
||||||
-XX:+UseNUMA
|
-XX:+UseNUMA
|
||||||
|
|||||||
Reference in New Issue
Block a user