mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-02-18 23:36:24 +00:00
Compare commits
75 Commits
2021.25.0-
...
2021.24.0-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1665bc874 | ||
|
|
b77586a10a | ||
|
|
9a3f3fc33f | ||
|
|
a88c046d59 | ||
|
|
871d54f44e | ||
|
|
cd59602d40 | ||
|
|
793bedcd14 | ||
|
|
0f94d0aece | ||
|
|
6ee44b3409 | ||
|
|
faa7553e54 | ||
|
|
0d85d672ef | ||
|
|
0e6c85f25a | ||
|
|
484417c7a3 | ||
|
|
dc44c328d4 | ||
|
|
7a4e308e8c | ||
|
|
b267afc0bc | ||
|
|
13a6b2c44e | ||
|
|
1db04946df | ||
|
|
c682e4ebf6 | ||
|
|
5132a662e7 | ||
|
|
79d169cb9a | ||
|
|
6950c05ea0 | ||
|
|
71dc5af9a9 | ||
|
|
098ba9554e | ||
|
|
c6925eb316 | ||
|
|
82963e7474 | ||
|
|
59fde19e3f | ||
|
|
63c5acfe49 | ||
|
|
1f1fa02031 | ||
|
|
250ce7849b | ||
|
|
c6587a115c | ||
|
|
a2ce3a7437 | ||
|
|
80cad3572d | ||
|
|
9a2eb0042f | ||
|
|
559745dd80 | ||
|
|
a3972d83bb | ||
|
|
baf7cdd7e2 | ||
|
|
f24096e584 | ||
|
|
d39f3b0afc | ||
|
|
add67113ff | ||
|
|
fe67ee5c79 | ||
|
|
5b777eff5b | ||
|
|
f36dd34f72 | ||
|
|
c4fa657c61 | ||
|
|
bfb0d19372 | ||
|
|
bef6e7b432 | ||
|
|
3263a23140 | ||
|
|
8163e266fe | ||
|
|
349f27f345 | ||
|
|
9b6b813fe8 | ||
|
|
1f39283fd0 | ||
|
|
2086562d03 | ||
|
|
67404c017a | ||
|
|
41e97454a9 | ||
|
|
31d082574d | ||
|
|
0f59ec97b7 | ||
|
|
a1ce1b5a24 | ||
|
|
fb3504ec1a | ||
|
|
b75f83cbf1 | ||
|
|
dc5192e2e7 | ||
|
|
76b5ec75cc | ||
|
|
4663723b84 | ||
|
|
2acb45dc62 | ||
|
|
de42f62031 | ||
|
|
7e690849b6 | ||
|
|
0a1c00f701 | ||
|
|
dc8c9e5d1a | ||
|
|
9577c84d6a | ||
|
|
575197a109 | ||
|
|
2b621b8236 | ||
|
|
14d3446f52 | ||
|
|
83a7481027 | ||
|
|
4c3a329e31 | ||
|
|
6c94e49732 | ||
|
|
af77b29509 |
19
Dockerfile
19
Dockerfile
@@ -1,4 +1,4 @@
|
|||||||
FROM eclipse-temurin:8-jdk
|
FROM adoptopenjdk:11-jdk
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
LABEL org.opencontainers.image.authors="Geoff Bourne <itzgeoff@gmail.com>"
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ RUN apt-get update \
|
|||||||
RUN addgroup --gid 1000 minecraft \
|
RUN addgroup --gid 1000 minecraft \
|
||||||
&& adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /data minecraft
|
&& adduser --system --shell /bin/false --uid 1000 --ingroup minecraft --home /data minecraft
|
||||||
|
|
||||||
COPY --chmod=644 files/sudoers* /etc/sudoers.d
|
COPY files/sudoers* /etc/sudoers.d
|
||||||
|
|
||||||
EXPOSE 25565 25575
|
EXPOSE 25565 25575
|
||||||
|
|
||||||
@@ -78,14 +78,15 @@ ENV UID=1000 GID=1000 \
|
|||||||
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
|
||||||
|
|
||||||
COPY --chmod=755 scripts/start* /
|
COPY scripts/start* /
|
||||||
COPY --chmod=755 bin/ /usr/local/bin/
|
COPY bin/ /usr/local/bin/
|
||||||
COPY --chmod=755 bin/mc-health /health.sh
|
COPY bin/mc-health /health.sh
|
||||||
COPY --chmod=644 files/server.properties /tmp/server.properties
|
COPY files/server.properties /tmp/server.properties
|
||||||
COPY --chmod=644 files/log4j2.xml /tmp/log4j2.xml
|
COPY files/log4j2.xml /tmp/log4j2.xml
|
||||||
COPY --chmod=755 files/autopause /autopause
|
COPY files/autopause /autopause
|
||||||
|
|
||||||
RUN dos2unix /start* /autopause/*
|
RUN dos2unix /start* && chmod +x /start* \
|
||||||
|
&& dos2unix /autopause/* && chmod +x /autopause/*.sh
|
||||||
|
|
||||||
ENTRYPOINT [ "/start" ]
|
ENTRYPOINT [ "/start" ]
|
||||||
HEALTHCHECK --start-period=1m CMD mc-health
|
HEALTHCHECK --start-period=1m CMD mc-health
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ When using the image `itzg:/minecraft-server` without a tag, the `latest` image
|
|||||||
|
|
||||||
| Tag name | Java version | Linux | JVM Type | Architecture |
|
| Tag name | Java version | Linux | JVM Type | Architecture |
|
||||||
| -------------- | -------------|--------|----------|-------------------|
|
| -------------- | -------------|--------|----------|-------------------|
|
||||||
| latest | 16 | Debian | Hotspot | amd64,arm64,armv7 |
|
| latest | 17 | Debian | Hotspot | amd64,arm64,armv7 |
|
||||||
| java8 | 8 | Alpine | Hotspot | amd64 |
|
| java8 | 8 | Alpine | Hotspot | amd64 |
|
||||||
| java8-multiarch | 8 | Debian | Hotspot | amd64,arm64,armv7 |
|
| java8-multiarch | 8 | Debian | Hotspot | amd64,arm64,armv7 |
|
||||||
| java8-openj9 | 8 | Debian | OpenJ9 | amd64 |
|
| java8-openj9 | 8 | Debian | OpenJ9 | amd64 |
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ if [[ $tag ]]; then
|
|||||||
"generate_release_notes": true
|
"generate_release_notes": true
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if ! curl "${auth[@]}" -H "Accept: application/vnd.github.v3+json" \
|
if ! echo curl "${auth[@]}" -H "Accept: application/vnd.github.v3+json" \
|
||||||
"${base}/repos/${owner}/${repo}/releases" -d "$releaseBody"; then
|
"${base}/repos/${owner}/${repo}/releases" -d "$releaseBody"; then
|
||||||
echo "ERROR failed to create github release $tag"
|
echo "ERROR failed to create github release $tag"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -115,6 +115,12 @@ case "${TYPE^^}" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
FORGE)
|
FORGE)
|
||||||
|
log "**********************************************************************"
|
||||||
|
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
|
||||||
|
log " since some mods require Java 8"
|
||||||
|
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
|
||||||
|
log " can be fixed with java8"
|
||||||
|
log "**********************************************************************"
|
||||||
exec ${SCRIPTS:-/}start-deployForge "$@"
|
exec ${SCRIPTS:-/}start-deployForge "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -127,6 +133,10 @@ case "${TYPE^^}" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
FTB|CURSEFORGE)
|
FTB|CURSEFORGE)
|
||||||
|
log "**********************************************************************"
|
||||||
|
log "NOTE: Some mods and modpacks may require Java 8."
|
||||||
|
log " If so, use itzg/minecraft-server:java8"
|
||||||
|
log "**********************************************************************"
|
||||||
exec ${SCRIPTS:-/}start-deployCF "$@"
|
exec ${SCRIPTS:-/}start-deployCF "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -171,6 +181,12 @@ case "${TYPE^^}" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
CRUCIBLE)
|
CRUCIBLE)
|
||||||
|
log "**********************************************************************"
|
||||||
|
log "WARNING: The image tag itzg/minecraft-server:java8 is recommended"
|
||||||
|
log " since some mods require Java 8"
|
||||||
|
log " Exception traces reporting ClassCastException: class jdk.internal.loader.ClassLoaders\$AppClassLoader"
|
||||||
|
log " can be fixed with java8"
|
||||||
|
log "**********************************************************************"
|
||||||
exec "${SCRIPTS:-/}start-deployCrucible" "$@"
|
exec "${SCRIPTS:-/}start-deployCrucible" "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
@@ -107,36 +107,7 @@ if [ -n "$ICON" ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
canUseRollingLogs=true
|
|
||||||
|
|
||||||
patchLog4jConfig() {
|
|
||||||
file=${1?}
|
|
||||||
url=${2?}
|
|
||||||
if ! get -o "$file" "$url"; then
|
|
||||||
log "ERROR: failed to download corrected log4j config"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
JVM_OPTS="-Dlog4j.configurationFile=${file} ${JVM_OPTS}"
|
|
||||||
canUseRollingLogs=false
|
|
||||||
}
|
|
||||||
|
|
||||||
# Patch Log4j remote code execution vulnerability
|
|
||||||
# See https://www.minecraft.net/en-us/article/important-message--security-vulnerability-java-edition
|
|
||||||
if versionLessThan 1.7; then
|
|
||||||
: # No patch required here.
|
|
||||||
elif isFamily VANILLA && versionLessThan 1.12; then
|
|
||||||
patchLog4jConfig log4j2_17-111.xml https://launcher.mojang.com/v1/objects/dd2b723346a8dcd48e7f4d245f6bf09e98db9696/log4j2_17-111.xml
|
|
||||||
elif isFamily VANILLA && versionLessThan 1.17; then
|
|
||||||
patchLog4jConfig log4j2_112-116.xml https://launcher.mojang.com/v1/objects/02937d122c86ce73319ef9975b58896fc1b491d1/log4j2_112-116.xml
|
|
||||||
elif versionLessThan 1.18.1; then
|
|
||||||
JVM_OPTS="-Dlog4j2.formatMsgNoLookups=true ${JVM_OPTS}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if isTrue ${ENABLE_ROLLING_LOGS:-false}; then
|
if isTrue ${ENABLE_ROLLING_LOGS:-false}; then
|
||||||
if ! ${canUseRollingLogs}; then
|
|
||||||
log "ERROR: Using rolling logs is currently not possible in the selected version due to CVE-2021-44228"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# Set up log configuration
|
# Set up log configuration
|
||||||
LOGFILE="/data/log4j2.xml"
|
LOGFILE="/data/log4j2.xml"
|
||||||
if [ ! -e "$LOGFILE" ]; then
|
if [ ! -e "$LOGFILE" ]; then
|
||||||
@@ -179,6 +150,28 @@ if [ -n "$JVM_DD_OPTS" ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
patchLog4jConfig() {
|
||||||
|
file=${1?}
|
||||||
|
url=${2?}
|
||||||
|
if ! get -o "$file" "$url"; then
|
||||||
|
log "ERROR: failed to download corrected log4j config"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
JVM_OPTS="-Dlog4j.configurationFile=${file} ${JVM_OPTS}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Patch Log4j remote code execution vulnerability
|
||||||
|
# See https://www.minecraft.net/en-us/article/important-message--security-vulnerability-java-edition
|
||||||
|
if versionLessThan 1.7; then
|
||||||
|
: # No patch required here.
|
||||||
|
elif isFamily VANILLA && versionLessThan 1.12; then
|
||||||
|
patchLog4jConfig log4j2_17-111.xml https://launcher.mojang.com/v1/objects/dd2b723346a8dcd48e7f4d245f6bf09e98db9696/log4j2_17-111.xml
|
||||||
|
elif isFamily VANILLA && versionLessThan 1.17; then
|
||||||
|
patchLog4jConfig log4j2_112-116.xml https://launcher.mojang.com/v1/objects/02937d122c86ce73319ef9975b58896fc1b491d1/log4j2_112-116.xml
|
||||||
|
elif versionLessThan 1.18.1; then
|
||||||
|
JVM_OPTS="-Dlog4j2.formatMsgNoLookups=true ${JVM_OPTS}"
|
||||||
|
fi
|
||||||
|
|
||||||
if isTrue ${ENABLE_JMX}; then
|
if isTrue ${ENABLE_JMX}; then
|
||||||
: ${JMX_PORT:=7091}
|
: ${JMX_PORT:=7091}
|
||||||
JVM_OPTS="${JVM_OPTS}
|
JVM_OPTS="${JVM_OPTS}
|
||||||
|
|||||||
Reference in New Issue
Block a user