mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-10-06 12:30:29 +00:00
Compare commits
15
Commits
2026.9.2
...
itzg-patch-4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
287bd8a5cd | ||
|
|
8541fa98c2 | ||
|
|
d85a019c57 | ||
|
|
5cb3f0a652 | ||
|
|
b94d51517d | ||
|
|
beed693663 | ||
|
|
770966bf5e | ||
|
|
67d1453ee1 | ||
|
|
7ea3f76d41 | ||
|
|
47130bb030 | ||
|
|
93f5a03995 | ||
|
|
00449564a8 | ||
|
|
b0f2be88cc | ||
|
|
685c16d6dc | ||
|
|
3a682c49f4 |
@@ -104,16 +104,14 @@ jobs:
|
||||
mcHelperVersion: 1.51.4-java8
|
||||
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
|
||||
- variant: java8
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
baseImage: eclipse-temurin:8-jre
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
# Pin version for Java 8, also be sure to set in verify-pr.yml
|
||||
mcHelperVersion: 1.51.4-java8
|
||||
- variant: java8-jdk
|
||||
baseImage: eclipse-temurin:8u312-b07-jdk-focal
|
||||
baseImage: eclipse-temurin:8-jdk
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
# Pin version for Java 8, also be sure to set in verify-pr.yml
|
||||
mcHelperVersion: 1.51.4-java8
|
||||
env:
|
||||
# Assume they line up, but when forked change to your Docker Hub username
|
||||
|
||||
@@ -55,7 +55,8 @@ jobs:
|
||||
knockdRepoOrg: Metalcape/knock
|
||||
# JAVA 8:
|
||||
- variant: java8
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
# make sure to track the base image version in build.yml
|
||||
baseImage: eclipse-temurin:8-jre
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
# For GLIBC_2.34 support
|
||||
|
||||
+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=0.18.1
|
||||
ARG MC_MONITOR_VERSION=1.18.2
|
||||
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.70.0
|
||||
ARG MC_HELPER_VERSION=1.71.1
|
||||
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
|
||||
|
||||
@@ -28,7 +28,7 @@ apt-get install -y \
|
||||
zstd \
|
||||
lbzip2 \
|
||||
nfs-common \
|
||||
libpcap0.8 \
|
||||
'libpcap0.8*' \
|
||||
libnuma1 \
|
||||
libcap2-bin \
|
||||
jattach \
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
### Using the MASH playbook
|
||||
|
||||
[The MASH Playbook](https://github.com/mother-of-all-self-hosting/mash-playbook) is a premade playbook with the option to deploy a [wide variety of open-source services](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/supported-services.md) to your server(s), including [docker-minecraft-server](https://github.com/XHawk87/ansible-role-minecraft), making it a good option if you want all the bells and whistles alongside your Minecraft server.
|
||||
[The MASH Playbook](https://github.com/mother-of-all-self-hosting/mash-playbook) is a premade playbook with the option to deploy a [wide variety of open-source services](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/supported-services.md) to your server(s), including [docker-minecraft-server](https://github.com/mother-of-all-self-hosting/ansible-role-minecraft), making it a good option if you want all the bells and whistles alongside your Minecraft server.
|
||||
- Check out the [Installation Guide](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/README.md) for the MASH playbook to get started.
|
||||
- You can then enable [Minecraft](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/minecraft.md) in your vars.yml.
|
||||
- Enable any supporting services that you might find useful, such as [user authentication](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/authelia.md), [remote backups](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/backup-borg.md), [email relay](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/exim-relay.md), [cron monitoring](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/healthchecks.md), [audio and video conferencing](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/jitsi.md), databases ([MariaDB](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/mariadb.md), [PostgresSQL](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/postgres.md)), [push notifications](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/ntfy.md), [uptime monitoring](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/uptime-kuma.md), [a website](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/wordpress.md), as well as installing any [extra files, folders, applications, services and running commands](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/auxiliary.md) automatically on deployment.
|
||||
|
||||
@@ -33,3 +33,7 @@ An image that dockerizes [rcon-web-admin](https://github.com/rcon-web-admin/rcon
|
||||
### [AutoStopper](https://github.com/Criseda/AutoStopper)
|
||||
|
||||
A Velocity plugin that stops idle backend servers and wakes them when players connect, with readiness-aware Docker lifecycle management.
|
||||
|
||||
### [Kobblestone](https://github.com/kobblestoneio/kobblestone)
|
||||
|
||||
A Kubernetes operator for Minecraft that supports custom resource types to manage servers, routers, backups and more.
|
||||
@@ -22,7 +22,8 @@ Where:
|
||||
|
||||
- **Project** is the project slug or ID, see below
|
||||
- **Version** is the version ID (such as "Oa9ZDzZq") or number (such as "2.21.2"). When omitted, the latest release version will be selected. Using version ID will override Minecraft and loader compatibility checks.
|
||||
- **Release Type** is `release`, `beta`, or `alpha` indicating the latest version to select.
|
||||
- **Release Type** is `release`, `beta`, or `alpha` indicating the latest version to select. By default, the newest version that is the same or better release type is selected.
|
||||
A `+` suffix can be used to indicate instead that the most "stable" version is selected.
|
||||
- **Prefix** is `datapack`, `fabric`, `forge`, or `paper`
|
||||
- The `datapack` prefix is optional when running a vanilla server
|
||||
- The `fabric`, `forge`, and `paper` prefixes allow for installing mods/plugins that differ from server's `TYPE`. Using [Sinytra Connector](https://modrinth.com/mod/connector) is an example of this, where Fabric mods can be loaded into a NeoForge server.
|
||||
@@ -46,6 +47,10 @@ Where:
|
||||
|
||||

|
||||
|
||||
!!! tip "Most stable release type"
|
||||
|
||||
As an example of using the `{release type}+` feature, [Concurrent Chunk Management for 1.12.11](https://modrinth.com/mod/c2me-fabric/versions?g=1.21.11) had a "release" version at "0.3.6.0.0" and then started publishing "alpha"s with "0.3.7+alpha.0.6+1.21.11". Using `c2me-fabric:alpha+` indicates that the newest "stable" is actually preferred, which is "0.3.6.0.0".
|
||||
|
||||
### Examples
|
||||
|
||||
| Description | Example projects entry |
|
||||
|
||||
@@ -4,22 +4,22 @@ deepmerge==3.0.1
|
||||
ghp-import==2.1.0
|
||||
griffe==2.3.0
|
||||
Jinja2==3.1.6
|
||||
Markdown==3.10.3
|
||||
Markdown==3.11
|
||||
MarkupSafe==3.0.3
|
||||
mergedeep==1.3.4
|
||||
mkdocs==1.6.1
|
||||
mkdocs-autorefs==1.4.4
|
||||
mkdocs-get-deps==0.2.2
|
||||
mkdocstrings==1.0.6
|
||||
mkdocstrings-python==2.0.8
|
||||
mkdocstrings-python==2.0.9
|
||||
packaging==26.3
|
||||
pathspec==1.1.1
|
||||
platformdirs==4.11.11
|
||||
platformdirs==4.12.0
|
||||
Pygments==2.21.0
|
||||
pymdown-extensions==12.0.1
|
||||
pymdown-extensions==12.1
|
||||
python-dateutil==2.9.0.post0
|
||||
PyYAML==6.0.3
|
||||
pyyaml_env_tag==1.1
|
||||
six==1.17.0
|
||||
watchdog==6.0.0
|
||||
zensical==0.0.63
|
||||
zensical==0.0.65
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
image: itzg/minecraft-server:java8
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
image: itzg/minecraft-server:java8
|
||||
environment:
|
||||
EULA: true
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
image: itzg/minecraft-server:java8
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./modpacks:/modpacks:ro
|
||||
|
||||
@@ -185,6 +185,9 @@
|
||||
"beyond-depth": {
|
||||
"forceIncludes": ["particular-reforged"]
|
||||
},
|
||||
"craftoria": {
|
||||
"forceIncludes": ["tmrv"]
|
||||
},
|
||||
"create-arcane-engineering": {
|
||||
"forceIncludes": ["just-enough-resources-jer"]
|
||||
},
|
||||
|
||||
+32
-21
@@ -4,9 +4,33 @@
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
# Define setup functions
|
||||
function getGTNHversion(){
|
||||
local gtnh_versions_json_url="https://downloads.gtnewhorizons.com/versions.json"
|
||||
local json
|
||||
local result
|
||||
|
||||
if ! json="$(curl -fsSL "$gtnh_versions_json_url")"; then
|
||||
logError "Failed to download from \"$gtnh_versions_json_url\"" >&2
|
||||
return 1
|
||||
elif [[ -z $json ]]; then
|
||||
logError "Empty response from \"$gtnh_versions_json_url\"" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! result="$(jq "$@" <<< "$json")"; then
|
||||
logError "Failed to parse the versions file from \"$gtnh_versions_json_url\"" >&2
|
||||
return 1
|
||||
elif [[ $result == "null" ]] || [[ -z $result ]]; then
|
||||
logError "No release found for GTNH_PACK_VERSION=$GTNH_PACK_VERSION. Please check if the version is valid." >&2
|
||||
return 1
|
||||
fi
|
||||
printf '%s\n' "$result"
|
||||
}
|
||||
|
||||
function getGTNHdownloadPath(){
|
||||
gtnh_download_path=""
|
||||
local release_object=""
|
||||
local log_version_from=""
|
||||
|
||||
# Select release JSON object
|
||||
# latest-dev will be removed in the future, but is still supported for now.
|
||||
@@ -14,37 +38,24 @@ function getGTNHdownloadPath(){
|
||||
if [ "$GTNH_PACK_VERSION" == "latest-dev" ]; then
|
||||
logWarning "GTNH_PACK_VERSION=latest-dev is deprecated and will be removed in the future."
|
||||
fi
|
||||
if ! release_object="$(
|
||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
||||
| jq -r '(.versions // .)|to_entries|sort_by(.value.releaseDate)|map(select(.value.title=="Beta release"))|.[-1]'
|
||||
)"; then logError "Failed to retrieve release from https://downloads.gtnewhorizons.com/versions.json"
|
||||
exit 1
|
||||
fi
|
||||
log "Selected $(jq '.key' <<< "$release_object") as latest dev version for download."
|
||||
release_object=$(getGTNHversion '(.versions // .)|to_entries|map(select(.value.title == "Beta release"))|sort_by(.value.releaseDate,(.key | ascii_downcase | if test("rc") then 2 elif test("beta") then 1 else 0 end))|.[-1]') || exit 1
|
||||
log_version_from="latest beta";
|
||||
|
||||
elif [ "$GTNH_PACK_VERSION" == "latest" ]; then
|
||||
if ! release_object="$(
|
||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
||||
| jq -r '(.versions // .)|to_entries|sort_by(.value.releaseDate)|map(select(.value.title=="Stable release"))|.[-1]'
|
||||
)"; then logError "Failed to retrieve release from https://downloads.gtnewhorizons.com/versions.json"
|
||||
exit 1
|
||||
fi
|
||||
log "Selected $(jq '.key' <<< "$release_object") as latest version for download."
|
||||
release_object=$(getGTNHversion '(.versions // .)|to_entries|sort_by(.value.releaseDate)|map(select(.value.title=="Stable release"))|.[-1]') || exit 1
|
||||
log_version_from="latest";
|
||||
|
||||
else
|
||||
if ! release_object="$(
|
||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
||||
| jq -r --arg USRIN "$GTNH_PACK_VERSION" '(.versions // .)|to_entries|sort_by(.value.releaseDate)|map(select(.key==$USRIN))|.[]'
|
||||
)"; then logError "Failed to retrieve release from https://downloads.gtnewhorizons.com/versions.json"
|
||||
exit 1
|
||||
fi
|
||||
log "Selected $(jq -r '.key' <<< "$release_object") as matching version for download."
|
||||
release_object=$(getGTNHversion --arg USRIN "$GTNH_PACK_VERSION" '($USRIN | ascii_downcase) as $in|(.versions // .)|to_entries|sort_by(.value.releaseDate)|map(select((.key | ascii_downcase)==$in))|.[]') || exit 1
|
||||
log_version_from="matching";
|
||||
|
||||
fi
|
||||
|
||||
if [[ -z $release_object ]]; then
|
||||
logError "No release found for GTNH_PACK_VERSION=$GTNH_PACK_VERSION. Please check if the version is valid."
|
||||
exit 1
|
||||
else
|
||||
log "Selected \"$(jq -r '.key' <<< "$release_object")\" as ${log_version_from} version for download."
|
||||
fi
|
||||
|
||||
# Select compatible server files for java version
|
||||
|
||||
+13
-3
@@ -596,11 +596,21 @@ function isType() {
|
||||
}
|
||||
|
||||
function extract() {
|
||||
src=${1?}
|
||||
destDir=${2?}
|
||||
local src=${1?}
|
||||
local destDir=${2?}
|
||||
shift 2
|
||||
# remaining args are paths within the archive to extract; if none, extract everything
|
||||
# Remaining args are paths within the archive; if none, extract everything.
|
||||
|
||||
# Use modern `mc-image-helper extract archive` if it exists. Standardises extraction logic
|
||||
# and checks if ZipSlips / Path Traversals exist before extraction
|
||||
# Supports ZIP, TAR, TAR.GZ, TAR.BZ2, TAR.ZSTD
|
||||
if mc-image-helper has-feature archive; then
|
||||
mc-image-helper archive extract --overwrite -- "${src}" "${destDir}" "$@"
|
||||
return $?
|
||||
fi
|
||||
|
||||
# Older helper builds, including Java 8, use the shell extraction fallback.
|
||||
local type
|
||||
type=$(file -b --mime-type "${src}")
|
||||
if [[ "$type" == application/octet-stream ]]; then
|
||||
logWarning "Detected non-specific file type $type for $src"
|
||||
|
||||
Reference in New Issue
Block a user