mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-11-21 22:32:39 +00:00
Compare commits
6
Commits
efa1806c8b
...
3397f20335
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3397f20335 | ||
|
|
0ff20db743 | ||
|
|
d8cd6f3f38 | ||
|
|
9693e382f3 | ||
|
|
cf72f1573f | ||
|
|
b5596f6296 |
No files matched your search
+4
-4
@@ -28,12 +28,12 @@ ARG APPS_REV=1
|
||||
ARG GITHUB_BASEURL=https://github.com
|
||||
|
||||
# renovate: datasource=github-releases packageName=itzg/easy-add
|
||||
ARG EASY_ADD_VERSION=0.8.17
|
||||
ARG EASY_ADD_VERSION=0.8.18
|
||||
ADD ${GITHUB_BASEURL}/itzg/easy-add/releases/download/${EASY_ADD_VERSION}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
|
||||
RUN chmod +x /usr/bin/easy-add
|
||||
|
||||
# renovate: datasource=github-releases packageName=itzg/restify
|
||||
ARG RESTIFY_VERSION=1.7.17
|
||||
ARG RESTIFY_VERSION=1.7.20
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${RESTIFY_VERSION} --var app=restify --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
@@ -51,13 +51,13 @@ 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-server-runner
|
||||
ARG MC_SERVER_RUNNER_VERSION=1.16.0
|
||||
ARG MC_SERVER_RUNNER_VERSION=1.16.1
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--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
|
||||
|
||||
# renovate: datasource=github-releases packageName=itzg/mc-image-helper versioning=loose
|
||||
ARG MC_HELPER_VERSION=1.73.1
|
||||
ARG MC_HELPER_VERSION=1.74.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
|
||||
|
||||
@@ -4,6 +4,8 @@ Mods and plugins can be auto-downloaded and upgraded from CurseForge by setting
|
||||
|
||||
A specific file can be omitted from each reference to allow for auto-selecting the newest version of the selected mod/plugin. The resolved `VERSION` and `TYPE` will be taken into consideration for selecting the appropriate file.
|
||||
|
||||
When `TYPE` is `CLEANROOM`, `CURSEFORGE_FILES` uses the Forge loader context to select compatible files. This only affects CurseForge file resolution; the server still runs with Cleanroom.
|
||||
|
||||
!!! info "CurseForge API key usage"
|
||||
|
||||
A CurseForge API key is _now_ included by this image on Java 17 and newer; however, you can always supply your own instead. A CurseForge API key can be allocated and set with `CF_API_KEY` (or `CF_API_KEY_FILE`) [as described here](../types-and-platforms/mod-platforms/auto-curseforge.md#api-key). The `java8` image (and other pre-Java 17 tags) does not include a baked-in key; set `CF_API_KEY` yourself.
|
||||
|
||||
@@ -2,7 +2,7 @@ click==8.5.0
|
||||
colorama==0.4.6
|
||||
deepmerge==3.0.1
|
||||
ghp-import==2.1.0
|
||||
griffe==2.3.0
|
||||
griffe==2.3.2
|
||||
Jinja2==3.1.6
|
||||
Markdown==3.11
|
||||
MarkupSafe==3.0.4
|
||||
@@ -10,16 +10,16 @@ mergedeep==1.3.4
|
||||
mkdocs==1.6.1
|
||||
mkdocs-autorefs==1.4.4
|
||||
mkdocs-get-deps==0.2.2
|
||||
mkdocstrings==1.0.6
|
||||
mkdocstrings==1.0.7
|
||||
mkdocstrings-python==2.0.9
|
||||
packaging==26.3
|
||||
pathspec==1.1.1
|
||||
platformdirs==4.12.3
|
||||
platformdirs==4.13.0
|
||||
Pygments==2.21.0
|
||||
pymdown-extensions==12.1
|
||||
pymdown-extensions==12.2
|
||||
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.67
|
||||
zensical==0.0.69
|
||||
@@ -87,4 +87,24 @@ Support for [NeoForge](https://neoforged.net/) is also provided. A NeoForge serv
|
||||
FORGE_INSTALLER_URL: https://github.com/CleanroomMC/Cleanroom/releases/download/0.2.4-alpha/cleanroom-0.2.4-alpha-installer.jar
|
||||
```
|
||||
|
||||
[Full example](https://github.com/itzg/docker-minecraft-server/tree/master/examples/cleanroom)
|
||||
[Full example](https://github.com/itzg/docker-minecraft-server/tree/master/examples/cleanroom)
|
||||
|
||||
#### Apply Cleanroom
|
||||
|
||||
As an alternative to replacing the `TYPE` as "cleanroom", you can use any of the Forge-like types above, including `AUTO_CURSEFORGE` described [here](../mod-platforms/auto-curseforge.md), and apply Cleanroom as the loader by setting the environment variable `APPLY_CLEANROOM` to "true".
|
||||
|
||||
All the configuration options described above can be used with this.
|
||||
|
||||
!!! warning
|
||||
|
||||
As mentioned above, Cleanroom **only works with 1.12.2**, so be sure to utilize modpacks and mods that are compatible with 1.12.2. If using a `TYPE` of "forge" or "neoforge", be sure to set `VERSION` to "1.12.2".
|
||||
|
||||
!!! example
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: AUTO_CURSEFORGE
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/enigmatica2expert/files/9088147
|
||||
APPLY_CLEANROOM: true
|
||||
```
|
||||
@@ -22,7 +22,7 @@ services:
|
||||
# CLEANROOM_FROM_URL: https://
|
||||
volumes:
|
||||
# use a named, managed volume for data volume
|
||||
- mc_data:/data
|
||||
- mc-data:/data
|
||||
# attach local host directory "mods" in same directory as this compose file
|
||||
# all mods in this directory get copied into /data/mods at startup
|
||||
- ./mods:/mods:ro
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
|
||||
: "${CLEANROOM_FORCE_REINSTALL:=false}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||||
isDebugging && set -x
|
||||
resultsFile=/data/.run-cleanroom.env
|
||||
|
||||
declare -a cleanroom_installer_options
|
||||
cleanroom_installer_options+=(--output-directory=/data)
|
||||
cleanroom_installer_options+=(--results-file="${resultsFile}")
|
||||
cleanroom_installer_options+=(--force-reinstall="${CLEANROOM_FORCE_REINSTALL}")
|
||||
|
||||
if [[ ${CLEANROOM_LOADER_VERSION} ]]; then
|
||||
cleanroom_installer_options+=(--loader-version="${CLEANROOM_LOADER_VERSION}")
|
||||
fi
|
||||
|
||||
if [[ ${CLEANROOM_INSTALLER_VERSION} ]]; then
|
||||
cleanroom_installer_options+=(--installer-version="${CLEANROOM_INSTALLER_VERSION}")
|
||||
fi
|
||||
|
||||
if [[ ${CLEANROOM_FROM_FILE} ]]; then
|
||||
cleanroom_installer_options+=(--from-local-file="${CLEANROOM_FROM_FILE}")
|
||||
fi
|
||||
|
||||
if [[ ${CLEANROOM_FROM_URL} ]]; then
|
||||
cleanroom_installer_options+=(--from-url="${CLEANROOM_FROM_URL}")
|
||||
fi
|
||||
|
||||
if [[ ${CLEANROOM_MAVEN_URL} ]]; then
|
||||
cleanroom_installer_options+=(--cleanroom-maven-url="${CLEANROOM_MAVEN_URL}")
|
||||
fi
|
||||
|
||||
if ! mc-image-helper install-cleanroom "${cleanroom_installer_options[@]}" ; then
|
||||
if [[ ${CLEANROOM_FROM_FILE} ]]; then
|
||||
logError "Failed to install Cleanroom given installer ${CLEANROOM_FROM_FILE}"
|
||||
elif [[ ${CLEANROOM_FROM_URL:-} ]]; then
|
||||
logError "Failed to install Cleanroom from ${CLEANROOM_FROM_URL}"
|
||||
else
|
||||
logError "Failed to install Cleanroom"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
applyResultsFile ${resultsFile}
|
||||
|
||||
export FAMILY=FORGE
|
||||
@@ -53,17 +53,6 @@ if [[ "$AUTOPAUSE_KNOCK_INTERFACE" == "lo" ]] ; then
|
||||
logWarning " Continuing with this setting."
|
||||
fi
|
||||
|
||||
if [[ -n "$MAX_TICK_TIME" && "$MAX_TICK_TIME" != "-1" ]] ; then
|
||||
logWarning "MAX_TICK_TIME is non-default, for autopause to work properly, this check should be disabled (-1 for versions >= 1.8.1)"
|
||||
elif [[ -z "$MAX_TICK_TIME" ]] ; then
|
||||
MAX_TICK_TIME=-1
|
||||
if versionLessThan 1.8.1; then
|
||||
# 10 years
|
||||
MAX_TICK_TIME=315360000000
|
||||
fi
|
||||
export MAX_TICK_TIME
|
||||
fi
|
||||
|
||||
# seq_cooldown cannot be larger than AUTOPAUSE_TIMEOUT_KN, otherwise the server may
|
||||
# become paused while knockd is still ignoring packets, preventing players from joining.
|
||||
let COOLDOWN=$AUTOPAUSE_TIMEOUT_KN/2
|
||||
|
||||
@@ -207,6 +207,17 @@ if isTrue "${VERSION_FROM_MODRINTH_PROJECTS:-}" && [[ ${MODRINTH_PROJECTS:-} ]];
|
||||
fi
|
||||
|
||||
if isTrue "${ENABLE_AUTOPAUSE}"; then
|
||||
if [[ -n "${MAX_TICK_TIME:-}" && "$MAX_TICK_TIME" != "-1" ]] ; then
|
||||
logWarning "MAX_TICK_TIME is non-default, for autopause to work properly, this check should be disabled (-1 for versions >= 1.8.1)"
|
||||
elif [[ -z "${MAX_TICK_TIME:-}" ]] ; then
|
||||
MAX_TICK_TIME=-1
|
||||
if versionLessThan 1.8.1; then
|
||||
# 10 years
|
||||
MAX_TICK_TIME=315360000000
|
||||
fi
|
||||
export MAX_TICK_TIME
|
||||
fi
|
||||
# Keep the default in this process so it reaches server.properties setup.
|
||||
"$(dirname "$0")/start-autopause"
|
||||
elif isTrue "${ENABLE_AUTOSTOP}"; then
|
||||
"$(dirname "$0")/start-autostop"
|
||||
|
||||
@@ -1,50 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
: "${CLEANROOM_FORCE_REINSTALL:=false}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||||
isDebugging && set -x
|
||||
resultsFile=/data/.run-cleanroom.env
|
||||
|
||||
declare -a cleanroom_installer_options
|
||||
cleanroom_installer_options+=(--output-directory=/data)
|
||||
cleanroom_installer_options+=(--results-file="${resultsFile}")
|
||||
cleanroom_installer_options+=(--force-reinstall="${CLEANROOM_FORCE_REINSTALL}")
|
||||
|
||||
if [[ ${CLEANROOM_LOADER_VERSION} ]]; then
|
||||
cleanroom_installer_options+=(--loader-version="${CLEANROOM_LOADER_VERSION}")
|
||||
fi
|
||||
|
||||
if [[ ${CLEANROOM_INSTALLER_VERSION} ]]; then
|
||||
cleanroom_installer_options+=(--installer-version="${CLEANROOM_INSTALLER_VERSION}")
|
||||
fi
|
||||
|
||||
if [[ ${CLEANROOM_FROM_FILE} ]]; then
|
||||
cleanroom_installer_options+=(--from-local-file="${CLEANROOM_FROM_FILE}")
|
||||
fi
|
||||
|
||||
if [[ ${CLEANROOM_FROM_URL} ]]; then
|
||||
cleanroom_installer_options+=(--from-url="${CLEANROOM_FROM_URL}")
|
||||
fi
|
||||
|
||||
if [[ ${CLEANROOM_MAVEN_URL} ]]; then
|
||||
cleanroom_installer_options+=(--cleanroom-maven-url="${CLEANROOM_MAVEN_URL}")
|
||||
fi
|
||||
|
||||
if ! mc-image-helper install-cleanroom "${cleanroom_installer_options[@]}" ; then
|
||||
if [[ ${CLEANROOM_FROM_FILE} ]]; then
|
||||
logError "Failed to install Cleanroom given installer ${CLEANROOM_FROM_FILE}"
|
||||
elif [[ ${CLEANROOM_FROM_URL:-} ]]; then
|
||||
logError "Failed to install Cleanroom from ${CLEANROOM_FROM_URL}"
|
||||
else
|
||||
logError "Failed to install Cleanroom"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
applyResultsFile ${resultsFile}
|
||||
|
||||
export FAMILY=FORGE
|
||||
# run within the current shell to retain exported environment variables
|
||||
. "$(dirname "$0")/start-applyCleanroom"
|
||||
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
@@ -342,6 +342,9 @@ function handleCurseForgeFiles() {
|
||||
forge|neoforge|fabric|quilt)
|
||||
args+=(--mod-loader "$TYPE")
|
||||
;;
|
||||
cleanroom)
|
||||
args+=(--mod-loader forge)
|
||||
;;
|
||||
*)
|
||||
if isFamily HYBRID; then
|
||||
# To disambiguate mc-mods we'll assume that hybrid servers
|
||||
@@ -406,4 +409,13 @@ case "X$MODCONFIG" in
|
||||
esac
|
||||
fi
|
||||
|
||||
if isTrue "${APPLY_CLEANROOM}"; then
|
||||
if [[ "$VERSION" != "1.12.2" ]]; then
|
||||
logError "Cleanroom only works with Minecraft version 1.12.2. Current version is $VERSION."
|
||||
exit 1
|
||||
fi
|
||||
# run within the current shell to retain exported environment variables
|
||||
. "$(dirname "$0")/start-applyCleanroom"
|
||||
fi
|
||||
|
||||
exec "$(dirname "$0")/start-setupMounts" "$@"
|
||||
@@ -127,8 +127,14 @@ if [[ "$WORLD" ]] && ( isTrue "${FORCE_WORLD_COPY}" || [ ! -d "$worldDest" ] );
|
||||
if [ "$FAMILY" = "SPIGOT" ]; then
|
||||
# Reorganise if a Spigot server
|
||||
log "Moving End and Nether maps to Spigot location"
|
||||
[ -d "$worldDest/DIM1" ] && mv -f "$worldDest/DIM1" "${worldDest}_the_end"
|
||||
[ -d "$worldDest/DIM-1" ] && mv -f "$worldDest/DIM-1" "${worldDest}_nether"
|
||||
if [ -d "$worldDest/DIM1" ]; then
|
||||
mkdir -p "${worldDest}_the_end"
|
||||
mv -f "$worldDest/DIM1" "${worldDest}_the_end/"
|
||||
fi
|
||||
if [ -d "$worldDest/DIM-1" ]; then
|
||||
mkdir -p "${worldDest}_nether"
|
||||
mv -f "$worldDest/DIM-1" "${worldDest}_nether/"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
services:
|
||||
mc:
|
||||
restart: "no"
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
SETUP_ONLY: "TRUE"
|
||||
TYPE: "PAPER"
|
||||
WORLD: /worlds/world
|
||||
# the following are only used to speed up test execution
|
||||
VERSION: 1.18.1
|
||||
PAPER_CUSTOM_JAR: /servers/fake.jar
|
||||
volumes:
|
||||
- ./worlds:/worlds:ro
|
||||
- ./data:/data
|
||||
@@ -0,0 +1,3 @@
|
||||
mc-image-helper assert fileExists world/level.dat && \
|
||||
mc-image-helper assert fileExists world_nether/DIM-1/some_nether_file && \
|
||||
mc-image-helper assert fileExists world_the_end/DIM1/some_end_file
|
||||
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Reference in new issue
Block a user