Compare commits

...

62 Commits

Author SHA1 Message Date
Geoff Bourne
f88cb8eee9 neoforge: handle new version ordering (#3703) 2025-10-09 18:54:56 -05:00
dependabot[bot]
18f69b7680 build(deps): bump docker/login-action from 3.5.0 to 3.6.0 in the updates group (#3697) 2025-10-06 07:13:20 -05:00
dependabot[bot]
1dbe0f9621 build(deps): bump mkdocs-material from 9.6.20 to 9.6.21 in /docs in the patches group (#3698) 2025-10-06 06:27:14 -05:00
Geoff Bourne
79518f124a Add colorwheel and colorwheel-patcher to default excludes (#3696) 2025-10-05 15:17:40 -05:00
Geoff Bourne
c6cf0857fc Fix script import path for RCON_CMDS_* (#3695) 2025-10-05 09:00:04 -05:00
Geoff Bourne
3eb8f85cd4 paper: now applies channel and resolves stable by default (#3692) 2025-10-04 16:37:18 -05:00
Geoff Bourne
cbffecfd3a Added related info about stop/down timeout (#3691) 2025-10-04 13:39:53 -05:00
Geoff Bourne
a19eadec80 Correct formatting of /start shim for alpine variants (#3690) 2025-10-04 12:38:42 -05:00
Crafter_Y
b7859d7496 Added DOWNLOAD_EXTRA_CONFIGS (#3679) 2025-10-01 07:30:30 -05:00
Geoff Bourne
c6cec6390a deps: upgrade mc-server-runner 1.13.4 for CVE fixes (#3678) 2025-09-28 17:07:22 -05:00
Leon Kampwerth
6c81a0fd49 Update Greg Tech New Horizons compose file example (#3677) 2025-09-28 15:25:56 -05:00
Geoff Bourne
b008a33a8f Added java25 images, deprecated java24 (#3675) 2025-09-27 10:52:23 -05:00
Geoff Bourne
31a39bc46b Add "ok menu" and "particle rain" to default excludes (#3674) 2025-09-27 10:20:34 -05:00
dependabot[bot]
593c94ad94 build(deps): bump the patches group in /docs with 2 updates (#3671) 2025-09-22 07:08:53 -05:00
kingcavespider1
d1da61d0de Fix USE_MEOWICE_FLAGS and appearance of Aikars enablement (#3660) 2025-09-21 09:10:51 -05:00
Geoff Bourne
ac805a4da6 Fix autostop-daemon.sh path in start-autostop (#3670) 2025-09-20 15:01:00 -05:00
iofq
0517a0a2b1 fix: update autopause-fcns.sh path (#3666) 2025-09-19 22:53:43 -05:00
Geoff Bourne
bdac28a323 Support selecting Paper "pre" versions (#3664) 2025-09-19 19:51:36 -05:00
Geoff Bourne
9a6b858b83 Add /start shim for containers using old entrypoint (#3663) 2025-09-19 17:17:59 -05:00
Geoff Bourne
cabeb9c695 Corrected retrieval of NanoLimbo release file (#3662) 2025-09-19 16:49:24 -05:00
Geoff Bourne
81cbc72ae9 Improve local development (#3661) 2025-09-19 15:07:35 -05:00
EmilyxFox
9cbe5c2228 More management server properties docs (#3657) 2025-09-12 14:41:06 -05:00
Geoff Bourne
d58dfeaaf4 fetch: download specific file to adjacent temp (#3653) 2025-09-11 19:08:08 -05:00
EmilyxFox
82ecda599e add new server properties added in 25w37a (#3651) 2025-09-10 07:12:11 -05:00
dependabot[bot]
d1e6f738f3 build(deps): bump mkdocs-material from 9.6.18 to 9.6.19 in /docs in the patches group (#3650) 2025-09-08 16:10:30 -05:00
dependabot[bot]
ffd6e7fc60 build(deps): bump actions/stale from 9 to 10 (#3649) 2025-09-08 07:26:12 -05:00
Geoff Bourne
99f31d5a9b Restore conditional logic for MeowIce flags (#3647)
Co-authored-by: EmilyxFox <48589793+EmilyxFox@users.noreply.github.com>
2025-09-05 15:57:46 -05:00
Maximilian Berg
155b478ee1 Add UnlockExperimentalVMOptions to MeowIce flags (#3644)
Co-authored-by: maxxberg <max.git@mx-berg.de>
2025-09-05 15:41:27 -05:00
Geoff Bourne
6faa3a379d Revert "move USE_AIKAR_FLAGS=TRUE into else block" (#3645) 2025-09-04 18:28:39 -05:00
EmilyxFox
fc6fcb68e5 move USE_AIKAR_FLAGS=TRUE into else block (#3642) 2025-09-04 16:45:05 -05:00
Geoff Bourne
0da12d1518 cf: remove failed mod downloads (#3641) 2025-09-03 07:23:05 -05:00
dependabot[bot]
a9b4e67d22 build(deps): bump mkdocs-autorefs from 1.4.2 to 1.4.3 in /docs in the patches group (#3640) 2025-09-02 06:44:43 -05:00
Bradley Zylstra
75016e948b Fix for Eternal 2 Modpack (#3637) 2025-08-29 19:29:03 -05:00
Patrick Cudahy
d72db19b4e Fix typo in uname command in start-configuration (#3635) 2025-08-27 08:49:22 -05:00
EmilyxFox
cad2bc1ef6 Add server properties from 25w35a (#3634) 2025-08-26 12:22:12 -05:00
dependabot[bot]
c29430ffc5 build(deps): bump mkdocs-material from 9.6.16 to 9.6.18 in /docs in the patches group (#3633) 2025-08-25 12:33:38 -05:00
dependabot[bot]
7c05109ffa build(deps): bump actions/checkout from 4.2.2 to 5.0.0 (#3632) 2025-08-25 12:28:30 -05:00
Geoff Bourne
ce0f1599de Skip Mohist lookup/download when MOHIST_BUILD provided and server jar exists (#3631) 2025-08-23 17:48:44 -05:00
Geoff Bourne
57a3fe7641 Fix Buffer Limits with SSH Service (#3626) 2025-08-18 21:46:54 -05:00
Geoff Bourne
75082daa1d modrinth: fix force include handling of default-excluded project (#3622) 2025-08-16 16:50:43 -05:00
Geoff Bourne
b1d68a65aa deps: upgrade helper for Reactor Netty 1.2.9 (#3620) 2025-08-14 20:34:34 -05:00
Geoff Bourne
11414c83c1 Provide option to disable HTTP/2 use (#3619) 2025-08-13 18:45:02 -05:00
Geoff Bourne
720006b445 Revert "Properly retry download when fabric installer is invalid" (#3618) 2025-08-13 11:52:25 -05:00
Geoff Bourne
9d2cd1475e Properly retry download when fabric installer is invalid (#3617) 2025-08-13 06:43:20 -05:00
dependabot[bot]
acfd6fadf8 build(deps): bump docker/login-action from 3.4.0 to 3.5.0 in the updates group (#3615) 2025-08-12 11:16:37 -05:00
Geoff Bourne
ba172b2aa9 Added all image tags to images.json (#3613) 2025-08-10 22:11:54 -05:00
Geoff Bourne
e4859fb23a Add images.json (#3612) 2025-08-10 22:06:31 -05:00
Geoff Bourne
eb682118ff Add Modrinth default exclusions needed for cobbleverse (#3609) 2025-08-10 12:17:46 -05:00
Geoff Bourne
2fbc804f3e misc: organize more of examples into subdirs as compose projects (#3608) 2025-08-10 09:06:58 -05:00
Geoff Bourne
5bd6287f52 misc: refactored bin content into files/shims (#3607) 2025-08-10 09:05:10 -05:00
Geoff Bourne
b6a8b95159 Validate Fabric launcher jar and use HTTP/2 (#3606) 2025-08-09 17:35:15 -05:00
Geoff Bourne
0d834dd992 Fixed VERSION_FROM_MODRINTH_PROJECTS when a project has a shorter list (#3605) 2025-08-09 13:41:20 -05:00
Geoff Bourne
0a5ac8aba6 Analyze CF_API_KEY key when auth failures (#3604) 2025-08-08 20:14:36 -05:00
Geoff Bourne
37d2aebb1e Populate MODPACK_NAME and MODPACK_VERSION from FTB modpacks (#3602) 2025-08-08 13:18:31 -05:00
Geoff Bourne
d5d1592c38 Pass proxy properties via MC_IMAGE_HELPER_OPTS (#3601) 2025-08-07 08:11:56 -05:00
Geoff Bourne
dedacfb94e Fixed noise with picking up JAVA_TOOL_OPTIONS (#3599) 2025-08-06 20:25:12 -05:00
Geoff Bourne
c6e970c8d2 Fixed HTTP proxy handling for operations using mc-image-helper (#3598) 2025-08-06 19:57:56 -05:00
Geoff Bourne
fa56741869 Limit/config concurrent downloads for CF and Modrinth (#3596) 2025-08-05 18:55:26 -05:00
EmilyxFox
2abae7462c Add clarifying information for CurseForge API keys (#3594) 2025-08-04 19:42:11 -05:00
dependabot[bot]
a569d63cf3 build(deps): bump docker/metadata-action from 5.7.0 to 5.8.0 in the updates group (#3589) 2025-08-04 06:51:00 -05:00
Geoff Bourne
e305782a8f Forge promotions and maven repo URLs are configurable (#3587) 2025-08-03 19:29:30 -05:00
Geoff Bourne
24c352949c Added skyfactory 4 example and excluding waila-stages (#3586) 2025-08-03 17:10:49 -05:00
111 changed files with 1419 additions and 1046 deletions

4
.gitattributes vendored
View File

@@ -1,2 +1,2 @@
# Auto detect text files and perform LF normalization
* text=lf
# Auto detect text files and perform LF normalization
* text eol=lf

View File

@@ -12,6 +12,7 @@ on:
- "examples/**"
- "notes/**"
- "kustomize/**"
- "images.json"
jobs:
build:
@@ -20,8 +21,8 @@ jobs:
matrix:
# NOTE: the "latest" variant is identified in the Docker meta step's 'latest' config
variant:
- java24
- java24-graalvm
- java25
- java25-graalvm
- java21
- java21-alpine
- java21-graalvm
@@ -36,13 +37,13 @@ jobs:
- java8-openj9
- java8-jdk
include:
# JAVA 24
- variant: java24
baseImage: eclipse-temurin:24-jre
# JAVA 25
- variant: java25
baseImage: eclipse-temurin:25-jre
platforms: linux/amd64,linux/arm64
mcVersion: latest
- variant: java24-graalvm
baseImage: container-registry.oracle.com/graalvm/jdk:24-ol8
- variant: java25-graalvm
baseImage: container-registry.oracle.com/graalvm/jdk:25-ol8
platforms: linux/amd64,linux/arm64
mcVersion: latest
# JAVA 21:
@@ -118,14 +119,14 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
with:
# for build-files step
fetch-depth: 0
- name: Docker meta
id: meta
uses: docker/metadata-action@v5.7.0
uses: docker/metadata-action@v5.8.0
with:
# NOTE for forks: if your Docker Hub organization doesn't match your Github repo's,
# then the use of ${{ github.repository_owner }} will need to be replaced.
@@ -185,14 +186,14 @@ jobs:
tests/test.sh
- name: Login to DockerHub
uses: docker/login-action@v3.4.0
uses: docker/login-action@v3.6.0
if: env.HAS_IMAGE_REPO_ACCESS
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GHCR
uses: docker/login-action@v3.4.0
uses: docker/login-action@v3.6.0
if: env.HAS_IMAGE_REPO_ACCESS
with:
registry: ghcr.io

View File

@@ -12,7 +12,7 @@ jobs:
pull-requests: write
steps:
- name: Process Stale Issues
uses: actions/stale@v9
uses: actions/stale@v10
with:
stale-issue-label: status/stale
stale-pr-label: status/stale

View File

@@ -11,6 +11,7 @@ on:
- "kustomize/**"
- "docker-compose*.yml"
- "mkdocs.yml"
- "images.json"
jobs:
build:
@@ -49,7 +50,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v5.0.0
with:
# for build-files step
fetch-depth: 0

View File

@@ -1,83 +1,91 @@
ARG BASE_IMAGE=eclipse-temurin:21-jre
FROM ${BASE_IMAGE}
# hook into docker BuildKit --platform support
# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
# The following three arg/env vars get used by the platform specific "install-packages" script
ARG EXTRA_DEB_PACKAGES=""
ARG EXTRA_DNF_PACKAGES=""
ARG EXTRA_ALPINE_PACKAGES=""
ARG FORCE_INSTALL_PACKAGES=1
RUN --mount=target=/build,source=build \
TARGET=${TARGETARCH}${TARGETVARIANT} \
/build/run.sh install-packages
RUN --mount=target=/build,source=build \
/build/run.sh setup-user
EXPOSE 25565
ARG APPS_REV=1
ARG GITHUB_BASEURL=https://github.com
ARG EASY_ADD_VERSION=0.8.11
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
ARG RESTIFY_VERSION=1.7.10
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
ARG RCON_CLI_VERSION=1.7.1
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${RCON_CLI_VERSION} --var app=rcon-cli --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_MONITOR_VERSION=0.15.6
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
ARG MC_SERVER_RUNNER_VERSION=1.13.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
ARG MC_HELPER_VERSION=1.48.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
RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
| tar -C /usr/share -zxf - \
&& ln -s /usr/share/mc-image-helper-${MC_HELPER_VERSION}/bin/mc-image-helper /usr/bin
VOLUME ["/data"]
WORKDIR /data
STOPSIGNAL SIGTERM
# End user MUST set EULA and change RCON_PASSWORD
ENV TYPE=VANILLA VERSION=LATEST EULA="" UID=1000 GID=1000 LC_ALL=en_US.UTF-8
COPY --chmod=755 scripts/start* /
COPY --chmod=755 bin/ /usr/local/bin/
COPY --chmod=755 bin/mc-health /health.sh
COPY --chmod=755 files/* /image/
COPY --chmod=755 files/auto /auto
RUN curl -fsSL -o /image/Log4jPatcher.jar https://github.com/CreeperHost/Log4jPatcher/releases/download/v1.0.1/Log4jPatcher-1.0.1.jar
RUN dos2unix /start* /auto/*
ENTRYPOINT [ "/start" ]
HEALTHCHECK --start-period=2m --retries=2 --interval=30s CMD mc-health
ARG BUILDTIME=local
ARG VERSION=local
ARG REVISION=local
RUN echo "buildtime=${BUILDTIME}\nversion=${VERSION}\nrevision=${REVISION}" > /etc/image.properties
ARG BASE_IMAGE=eclipse-temurin:21-jre
FROM ${BASE_IMAGE}
# hook into docker BuildKit --platform support
# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
# The following three arg/env vars get used by the platform specific "install-packages" script
ARG EXTRA_DEB_PACKAGES=""
ARG EXTRA_DNF_PACKAGES=""
ARG EXTRA_ALPINE_PACKAGES=""
ARG FORCE_INSTALL_PACKAGES=1
RUN --mount=target=/build,source=build \
TARGET=${TARGETARCH}${TARGETVARIANT} \
/build/run.sh install-packages
RUN --mount=target=/build,source=build \
/build/run.sh setup-user
EXPOSE 25565
ARG APPS_REV=1
ARG GITHUB_BASEURL=https://github.com
ARG EASY_ADD_VERSION=0.8.11
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
ARG RESTIFY_VERSION=1.7.10
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
ARG RCON_CLI_VERSION=1.7.1
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${RCON_CLI_VERSION} --var app=rcon-cli --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_MONITOR_VERSION=0.15.6
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
ARG MC_SERVER_RUNNER_VERSION=1.13.4
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
ARG MC_HELPER_VERSION=1.49.2
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
RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
| tar -C /usr/share -zxf - \
&& ln -s /usr/share/mc-image-helper-${MC_HELPER_VERSION}/ /usr/share/mc-image-helper \
&& ln -s /usr/share/mc-image-helper/bin/mc-image-helper /usr/bin
VOLUME ["/data"]
WORKDIR /data
STOPSIGNAL SIGTERM
# End user MUST set EULA and change RCON_PASSWORD
ENV TYPE=VANILLA VERSION=LATEST EULA="" UID=1000 GID=1000 LC_ALL=en_US.UTF-8
COPY --chmod=755 scripts/start* /image/scripts/
# Backward compatible shim for those with legacy entrypoint
COPY --chmod=755 <<EOF /start
#!/bin/bash
exec /image/scripts/start
EOF
COPY --chmod=755 scripts/auto/* /image/scripts/auto/
COPY --chmod=755 scripts/shims/* /image/scripts/shims/
RUN ln -s /image/scripts/shims/* /usr/local/bin/
COPY --chmod=755 files/* /image/
RUN curl -fsSL -o /image/Log4jPatcher.jar https://github.com/CreeperHost/Log4jPatcher/releases/download/v1.0.1/Log4jPatcher-1.0.1.jar
RUN dos2unix /image/scripts/start* /image/scripts/auto/*
ENTRYPOINT [ "/image/scripts/start" ]
HEALTHCHECK --start-period=2m --retries=2 --interval=30s CMD mc-health
ARG BUILDTIME=local
ARG VERSION=local
ARG REVISION=local
RUN echo "buildtime=${BUILDTIME}\nversion=${VERSION}\nrevision=${REVISION}" > /etc/image.properties

View File

@@ -1,143 +1,139 @@
# JVM Options
## Memory Limit
By default, the image declares an initial and maximum Java memory-heap limit of 1 GB. There are several ways to adjust the memory settings:
- `MEMORY`: "1G" by default, can be used to adjust both initial (`Xms`) and max (`Xmx`) memory heap settings of the JVM
- `INIT_MEMORY`: independently sets the initial heap size
- `MAX_MEMORY`: independently sets the max heap size
The values of all three are passed directly to the JVM and support format/units as `<size>[g|G|m|M|k|K]`.
!!! example "Using docker run"
```
-e MEMORY=2G
```
or to use init and max memory:
```
-e INIT_MEMORY=1G -e MAX_MEMORY=4G
```
!!! example "Using compose file"
```
environment:
MEMORY: 2G
```
or to use init and max memory:
```
environment:
INIT_MEMORY: 1G
MAX_MEMORY: 4G
```
To let the JVM calculate the heap size from the container declared memory limit, unset `MEMORY` with an empty value, such as `-e MEMORY=""`. By default, the JVM will use 25% of the container memory limit as the heap limit; however, as an example the following would tell the JVM to use 75% of the container limit of 4GB of memory:
!!! example "MaxRAMPercentage using compose file"
```
environment:
MEMORY: ""
JVM_XX_OPTS: "-XX:MaxRAMPercentage=75"
deploy:
resources:
limits:
memory: 4G
```
!!! important
The settings above only set the Java **heap** limits. Memory resource requests and limits on the overall container should also account for non-heap memory usage. An extra 25% is [a general best practice](https://dzone.com/articles/best-practices-java-memory-arguments-for-container).
## Extra JVM Options
General JVM options can be passed to the Minecraft Server invocation by passing a `JVM_OPTS`
environment variable. The JVM requires `-XX` options to precede `-X` options, so those can be declared in `JVM_XX_OPTS`. Both variables are space-delimited, raw JVM arguments.
```
docker run ... -e JVM_OPTS="-someJVMOption someJVMOptionValue" ...
```
**NOTE** When declaring `JVM_OPTS` in a compose file's `environment` section with list syntax, **do not** include the quotes:
```yaml
environment:
- EULA=true
- JVM_OPTS=-someJVMOption someJVMOptionValue
```
Using object syntax is recommended and more intuitive:
```yaml
environment:
EULA: "true"
JVM_OPTS: "-someJVMOption someJVMOptionValue"
# or
# JVM_OPTS: -someJVMOption someJVMOptionValue
```
As a shorthand for passing several system properties as `-D` arguments, you can instead pass a comma separated list of `name=value` or `name:value` pairs with `JVM_DD_OPTS`. (The colon syntax is provided for management platforms like Plesk that don't allow `=` inside a value.)
For example, instead of passing
```yaml
JVM_OPTS: -Dfml.queryResult=confirm -Dname=value
```
you can use
```yaml
JVM_DD_OPTS: fml.queryResult=confirm,name=value
```
## Enable Remote JMX for Profiling
To enable remote JMX, such as for profiling with VisualVM or JMC, set the environment variable `ENABLE_JMX` to "true", set `JMX_HOST` to the IP/host running the Docker container, and add a port forwarding of TCP port 7091, such as:
!!! example
With `docker run`
```
-e ENABLE_JMX=true -e JMX_HOST=$HOSTNAME -p 7091:7091
```
If needing to map to a different port, then also set the environment variable `JMX_PORT` to the desired host port.
!!! example
With a compose file:
```yaml
environment:
ENABLE_JMX: true
JMX_HOST: ${HOSTNAME}
JMX_PORT: "7092"
ports:
- "7092:7092"
```
## Enable Aikar's Flags
[Aikar has done some research](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/) into finding the optimal JVM flags for GC tuning, which becomes more important as more users are connected concurrently. [PaperMC also has an explanation](https://docs.papermc.io/paper/aikars-flags) of what the JVM flags are doing.
The set of flags documented there can be added using
-e USE_AIKAR_FLAGS=true
When `MEMORY` is greater than or equal to 12G, then the Aikar flags will be adjusted according to the article.
## Enable MeowIce's Flags
[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
-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`
# JVM Options
## Memory Limit
By default, the image declares an initial and maximum Java memory-heap limit of 1 GB. There are several ways to adjust the memory settings:
- `MEMORY`: "1G" by default, can be used to adjust both initial (`Xms`) and max (`Xmx`) memory heap settings of the JVM
- `INIT_MEMORY`: independently sets the initial heap size
- `MAX_MEMORY`: independently sets the max heap size
The values of all three are passed directly to the JVM and support format/units as `<size>[g|G|m|M|k|K]`.
!!! example "Using docker run"
```
-e MEMORY=2G
```
or to use init and max memory:
```
-e INIT_MEMORY=1G -e MAX_MEMORY=4G
```
!!! example "Using compose file"
```
environment:
MEMORY: 2G
```
or to use init and max memory:
```
environment:
INIT_MEMORY: 1G
MAX_MEMORY: 4G
```
To let the JVM calculate the heap size from the container declared memory limit, unset `MEMORY` with an empty value, such as `-e MEMORY=""`. By default, the JVM will use 25% of the container memory limit as the heap limit; however, as an example the following would tell the JVM to use 75% of the container limit of 4GB of memory:
!!! example "MaxRAMPercentage using compose file"
```
environment:
MEMORY: ""
JVM_XX_OPTS: "-XX:MaxRAMPercentage=75"
deploy:
resources:
limits:
memory: 4G
```
!!! important
The settings above only set the Java **heap** limits. Memory resource requests and limits on the overall container should also account for non-heap memory usage. An extra 25% is [a general best practice](https://dzone.com/articles/best-practices-java-memory-arguments-for-container).
## Extra JVM Options
General JVM options can be passed to the Minecraft Server invocation by passing a `JVM_OPTS`
environment variable. The JVM requires `-XX` options to precede `-X` options, so those can be declared in `JVM_XX_OPTS`. Both variables are space-delimited, raw JVM arguments.
```
docker run ... -e JVM_OPTS="-someJVMOption someJVMOptionValue" ...
```
**NOTE** When declaring `JVM_OPTS` in a compose file's `environment` section with list syntax, **do not** include the quotes:
```yaml
environment:
- EULA=true
- JVM_OPTS=-someJVMOption someJVMOptionValue
```
Using object syntax is recommended and more intuitive:
```yaml
environment:
EULA: "true"
JVM_OPTS: "-someJVMOption someJVMOptionValue"
# or
# JVM_OPTS: -someJVMOption someJVMOptionValue
```
As a shorthand for passing several system properties as `-D` arguments, you can instead pass a comma separated list of `name=value` or `name:value` pairs with `JVM_DD_OPTS`. (The colon syntax is provided for management platforms like Plesk that don't allow `=` inside a value.)
For example, instead of passing
```yaml
JVM_OPTS: -Dfml.queryResult=confirm -Dname=value
```
you can use
```yaml
JVM_DD_OPTS: fml.queryResult=confirm,name=value
```
## Enable Remote JMX for Profiling
To enable remote JMX, such as for profiling with VisualVM or JMC, set the environment variable `ENABLE_JMX` to "true", set `JMX_HOST` to the IP/host running the Docker container, and add a port forwarding of TCP port 7091, such as:
!!! example
With `docker run`
```
-e ENABLE_JMX=true -e JMX_HOST=$HOSTNAME -p 7091:7091
```
If needing to map to a different port, then also set the environment variable `JMX_PORT` to the desired host port.
!!! example
With a compose file:
```yaml
environment:
ENABLE_JMX: true
JMX_HOST: ${HOSTNAME}
JMX_PORT: "7092"
ports:
- "7092:7092"
```
## Enable Aikar's Flags
[Aikar has done some research](https://aikar.co/2018/07/02/tuning-the-jvm-g1gc-garbage-collector-flags-for-minecraft/) into finding the optimal JVM flags for GC tuning, which becomes more important as more users are connected concurrently. [PaperMC also has an explanation](https://docs.papermc.io/paper/aikars-flags) of what the JVM flags are doing.
The set of flags documented there can be added using
-e USE_AIKAR_FLAGS=true
When `MEMORY` is greater than or equal to 12G, then the Aikar flags will be adjusted according to the article.
## Enable MeowIce's Flags
[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 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`.

View File

@@ -1,161 +1,189 @@
## Running with a custom server JAR
If you would like to run a custom server JAR, set `-e TYPE=CUSTOM` and pass the custom server
JAR via `CUSTOM_SERVER`. It can either be a URL or a container path to an existing JAR file.
If it is a URL, it will only be downloaded into the `/data` directory if it wasn't already. As
such, if you need to upgrade or re-download the JAR, then you will need to stop the container,
remove the file from the container's `/data` directory, and start again.
## Force re-download of the server file
For VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, CURSEFORGE, SPONGEVANILLA server types, set
`$FORCE_REDOWNLOAD` to some value (e.g. 'true) to force a re-download of the server file for
the particular server type. by adding a `-e FORCE_REDOWNLOAD=true` to your command-line.
For example, with PaperSpigot, it would look something like this:
```
docker run -d -v /path/on/host:/data \
-e TYPE=PAPER -e FORCE_REDOWNLOAD=true \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
```
## Running as alternate user/group ID
By default, the container will switch to and run the Minecraft server as user ID 1000 and group ID 1000; however, that can be changed by setting the environment variables `UID` and `GID`.
The startup will also skip user switching if the `--user`/`-u` argument is passed to `docker run` or `user` is set on the compose service.
## Extra Arguments
Arguments that would usually be passed to the jar file (those which are written after the filename) can be passed via the `EXTRA_ARGS` environment variable.
See [Custom worlds directory path](../misc/world-data.md#custom-worlds-directory-path) for an example.
## Interactive and Color Console
When RCON is enabled, which is the default, and [TTY](https://docs.docker.com/compose/compose-file/05-services/#tty) is enabled on the container, then some server types will output colorized logs and provide a fully interactive console. To access the interactive console, use [`docker attach`](https://docs.docker.com/engine/reference/commandline/container_attach/) (not `exec`). When finished, make sure to use the sequence Control-P, Control-Q to detach without stopping the container.
If this behavior interferes with the log content, then disable TTY or remove the setting entirely since the default is disabled. In a compose file, set the service's `tty` parameter to `false`. On the `docker run` command-line remove the `-t` argument.
## Server Shutdown Options
To allow time for players to finish what they're doing during a graceful server shutdown, set `STOP_SERVER_ANNOUNCE_DELAY` to a number of seconds to delay after an announcement is posted by the server.
!!! warning "Increase stop grace period"
The Docker stop grace period must be increased to a value longer than the announce delay. The value to use that is longer than announce delay will vary based upon the amount of time it takes for final world data saving. If the container exits with exit code 137, then that indicates a longer grace period is needed.
The grace period can be increased using [the -t option on docker-compose down](https://docs.docker.com/compose/reference/down/) or set the [stop_grace_period](https://docs.docker.com/compose/compose-file/05-services/#stop_grace_period) in the compose file.
The `STOP_SERVER_ANNOUNCE_DELAY` can be bypassed by sending a `SIGUSR1` signal to the `mc-server-runner` process.
`docker`:
docker stop --signal SIGUSR1 mc
`docker compose`:
docker compose kill --signal SIGUSR1
## Configuration Options for Minecraft Server Health Monitoring
The image tags include specific variables to simplify configuration for monitoring the health of a Minecraft server:
- `-e SERVER_HOST=localhost` : This variable sets the host address of the Minecraft server to be monitored. By default, it is set to `localhost`, but you can replace it with the actual hostname or IP address of your Minecraft server.
- `-e SERVER_PORT=25565` : This variable sets the port number on which the Minecraft server is running. By default, Minecraft servers run on port 25565, but if your server is configured to use a different port, you should replace `25565` with the correct port number. This helps the monitoring system to accurately check the health status of the Minecraft server on the specified port.
## OpenJ9 Specific Options
The openj9 image tags include specific variables to simplify configuration:
- `-e TUNE_VIRTUALIZED=TRUE` : enables the option to
[optimize for virtualized environments](https://www.eclipse.org/openj9/docs/xtunevirtualized/)
- `-e TUNE_NURSERY_SIZES=TRUE` : configures nursery sizes where the initial size is 50%
of the `MAX_MEMORY` and the max size is 80%.
## Enabling rolling logs
By default the vanilla log file will grow without limit. The logger can be reconfigured to use a rolling log files strategy by using:
```
-e ENABLE_ROLLING_LOGS=true
```
> **NOTE** this will interfere with interactive/color consoles [as described in the section above](#interactive-and-color-console)
## Timezone Configuration
You can configure the timezone to match yours by setting the `TZ` environment variable:
-e TZ=Europe/London
such as:
docker run -d -it -e TZ=Europe/London -p 25565:25565 --name mc itzg/minecraft-server
Or mounting `/etc/timezone` as readonly (not supported on Windows):
-v /etc/timezone:/etc/timezone:ro
such as:
docker run -d -it -v /etc/timezone:/etc/timezone:ro -p 25565:25565 --name mc itzg/minecraft-server
## HTTP Proxy
You may configure the use of an HTTP/HTTPS proxy by passing the proxy's URL via the `PROXY`
environment variable. In [the example compose file](https://github.com/itzg/docker-minecraft-server/blob/master/examples/docker-compose-proxied.yml) it references
a companion squid proxy by setting the equivalent of
-e PROXY=proxy:3128
## Using "noconsole" option
Some older versions (pre-1.14) of Spigot required `--noconsole` to be passed when detaching stdin, which can be done by setting `-e CONSOLE=FALSE`.
## Explicitly disable GUI
Some older servers get confused and think that the GUI interface is enabled. You can explicitly
disable that by passing `-e GUI=FALSE`.
## Stop Duration
When the container is signalled to stop, the Minecraft process wrapper will attempt to send a "stop" command via RCON or console and waits for the process to gracefully finish. By default it waits 60 seconds, but that duration can be configured by setting the environment variable `STOP_DURATION` to the number of seconds.
## Setup only
If you are using a host-attached data directory, then you can have the image setup the Minecraft server files and stop prior to launching the server process by setting `SETUP_ONLY` to `true`.
## Enable Flare Flags
To enable the JVM flags required to fully support the [Flare profiling suite](https://blog.airplane.gg/flare), set the following variable:
-e USE_FLARE_FLAGS=true
Flare is built-in to Pufferfish/Purpur, and is available in [plugin form](https://github.com/TECHNOVE/FlarePlugin) for other server types.
## Enable support for optimized SIMD operations
To enable support for optimized SIMD operations, the JVM flag can be set with the following variable:
-e USE_SIMD_FLAGS=true
SIMD optimized operations are supported by Pufferfish and Purpur.
## Enable timestamps in init logs
Before the container starts the Minecraft Server its output is prefixed with `[init]`, such as
```
[init] Starting the Minecraft server...
```
To also include the timestamp with each log, set `LOG_TIMESTAMP` to "true". The log output will then look like:
```
[init] 2022-02-05 16:58:33+00:00 Starting the Minecraft server...
```
## Running with a custom server JAR
If you would like to run a custom server JAR, set `-e TYPE=CUSTOM` and pass the custom server
JAR via `CUSTOM_SERVER`. It can either be a URL or a container path to an existing JAR file.
If it is a URL, it will only be downloaded into the `/data` directory if it wasn't already. As
such, if you need to upgrade or re-download the JAR, then you will need to stop the container,
remove the file from the container's `/data` directory, and start again.
## Force re-download of the server file
For VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, CURSEFORGE, SPONGEVANILLA server types, set
`$FORCE_REDOWNLOAD` to some value (e.g. 'true) to force a re-download of the server file for
the particular server type. by adding a `-e FORCE_REDOWNLOAD=true` to your command-line.
For example, with PaperSpigot, it would look something like this:
```
docker run -d -v /path/on/host:/data \
-e TYPE=PAPER -e FORCE_REDOWNLOAD=true \
-p 25565:25565 -e EULA=TRUE --name mc itzg/minecraft-server
```
## Running as alternate user/group ID
By default, the container will switch to and run the Minecraft server as user ID 1000 and group ID 1000; however, that can be changed by setting the environment variables `UID` and `GID`.
The startup will also skip user switching if the `--user`/`-u` argument is passed to `docker run` or `user` is set on the compose service.
## Extra Arguments
Arguments that would usually be passed to the jar file (those which are written after the filename) can be passed via the `EXTRA_ARGS` environment variable.
See [Custom worlds directory path](../misc/world-data.md#custom-worlds-directory-path) for an example.
## Interactive and Color Console
When RCON is enabled, which is the default, and [TTY](https://docs.docker.com/compose/compose-file/05-services/#tty) is enabled on the container, then some server types will output colorized logs and provide a fully interactive console. To access the interactive console, use [`docker attach`](https://docs.docker.com/engine/reference/commandline/container_attach/) (not `exec`). When finished, make sure to use the sequence Control-P, Control-Q to detach without stopping the container.
If this behavior interferes with the log content, then disable TTY or remove the setting entirely since the default is disabled. In a compose file, set the service's `tty` parameter to `false`. On the `docker run` command-line remove the `-t` argument.
## Server Shutdown Options
To allow time for players to finish what they're doing during a graceful server shutdown, set `STOP_SERVER_ANNOUNCE_DELAY` to a number of seconds to delay after an announcement is posted by the server.
!!! warning "Increase stop grace period"
The Docker stop grace period must be increased to a value longer than the announce delay. The value to use that is longer than announce delay will vary based upon the amount of time it takes for final world data saving. If the container exits with exit code 137, then that indicates a longer grace period is needed.
The grace period can be increased using [the -t option on docker-compose down](https://docs.docker.com/compose/reference/down/) or set the [stop_grace_period](https://docs.docker.com/compose/compose-file/05-services/#stop_grace_period) in the compose file.
The `STOP_SERVER_ANNOUNCE_DELAY` can be bypassed by sending a `SIGUSR1` signal to the `mc-server-runner` process.
`docker`:
docker stop --signal SIGUSR1 mc
`docker compose`:
docker compose kill --signal SIGUSR1
## Configuration Options for Minecraft Server Health Monitoring
The image tags include specific variables to simplify configuration for monitoring the health of a Minecraft server:
- `-e SERVER_HOST=localhost` : This variable sets the host address of the Minecraft server to be monitored. By default, it is set to `localhost`, but you can replace it with the actual hostname or IP address of your Minecraft server.
- `-e SERVER_PORT=25565` : This variable sets the port number on which the Minecraft server is running. By default, Minecraft servers run on port 25565, but if your server is configured to use a different port, you should replace `25565` with the correct port number. This helps the monitoring system to accurately check the health status of the Minecraft server on the specified port.
## OpenJ9 Specific Options
The openj9 image tags include specific variables to simplify configuration:
- `-e TUNE_VIRTUALIZED=TRUE` : enables the option to
[optimize for virtualized environments](https://www.eclipse.org/openj9/docs/xtunevirtualized/)
- `-e TUNE_NURSERY_SIZES=TRUE` : configures nursery sizes where the initial size is 50%
of the `MAX_MEMORY` and the max size is 80%.
## Enabling rolling logs
By default the vanilla log file will grow without limit. The logger can be reconfigured to use a rolling log files strategy by using:
```
-e ENABLE_ROLLING_LOGS=true
```
> **NOTE** this will interfere with interactive/color consoles [as described in the section above](#interactive-and-color-console)
## Timezone Configuration
You can configure the timezone to match yours by setting the `TZ` environment variable:
-e TZ=Europe/London
such as:
docker run -d -it -e TZ=Europe/London -p 25565:25565 --name mc itzg/minecraft-server
Or mounting `/etc/timezone` as readonly (not supported on Windows):
-v /etc/timezone:/etc/timezone:ro
such as:
docker run -d -it -v /etc/timezone:/etc/timezone:ro -p 25565:25565 --name mc itzg/minecraft-server
## HTTP Proxy
You may configure the use of an HTTP/HTTPS proxy by passing the proxy's "host:port" via the environment variable `PROXY`. In [the example compose file](https://github.com/itzg/docker-minecraft-server/blob/master/examples/docker-compose-proxied.yml) it references a Squid proxy. The host and port can be separately passed via the environment variables `PROXY_HOST` and `PROXY_PORT`. A `|` delimited list of hosts to exclude from proxying can be passed via `PROXY_NON_PROXY_HOSTS`.
## Using "noconsole" option
Some older versions (pre-1.14) of Spigot required `--noconsole` to be passed when detaching stdin, which can be done by setting `-e CONSOLE=FALSE`.
## Explicitly disable GUI
Some older servers get confused and think that the GUI interface is enabled. You can explicitly
disable that by passing `-e GUI=FALSE`.
## Stop Duration
When the container is signaled to stop, the Minecraft process wrapper will attempt to send a "stop" command via RCON or console and waits for the process to gracefully finish. By default, it waits 60 seconds, but that duration can be configured by setting the environment variable `STOP_DURATION` to the number of seconds.
Be sure to also increase the shutdown timeout described [here for docker compose down](https://docs.docker.com/reference/cli/docker/compose/down/#options) and [here for docker stop](https://docs.docker.com/reference/cli/docker/container/stop/#options).
## Setup only
If you are using a host-attached data directory, then you can have the image setup the Minecraft server files and stop prior to launching the server process by setting `SETUP_ONLY` to `true`.
## Enable Flare Flags
To enable the JVM flags required to fully support the [Flare profiling suite](https://blog.airplane.gg/flare), set the following variable:
-e USE_FLARE_FLAGS=true
Flare is built-in to Pufferfish/Purpur, and is available in [plugin form](https://github.com/TECHNOVE/FlarePlugin) for other server types.
## Enable support for optimized SIMD operations
To enable support for optimized SIMD operations, the JVM flag can be set with the following variable:
-e USE_SIMD_FLAGS=true
SIMD optimized operations are supported by Pufferfish and Purpur.
## Downloading extra configuration files
You can download additional configuration files or other resources before the server starts by using the `DOWNLOAD_EXTRA_CONFIGS` environment variable. This is useful for downloading configs that you want to patch or modify during the startup process.
The format uses a `<` separator between the destination path and the source URL:
```
DOWNLOAD_EXTRA_CONFIGS=destination<source_url[,destination2<source_url2,...]
```
For example, to download configuration files for plugins:
```yaml
environment:
DOWNLOAD_EXTRA_CONFIGS: |
plugins/WorldEdit<https://raw.githubusercontent.com/EngineHub/WorldEdit/refs/heads/version/7.3.x/worldedit-bukkit/src/main/resources/defaults/config.yml
plugins/EssentialsX<https://raw.githubusercontent.com/EssentialsX/Essentials/refs/heads/2.x/Essentials/src/main/resources/config.yml
```
Or as a single line:
```yaml
environment:
DOWNLOAD_EXTRA_CONFIGS: "plugins/WorldEdit<https://example.com/worldedit.yml,config<https://example.com/another.yml"
```
The files will be downloaded to `/data/` relative paths, so `plugins/WorldEdit` will be saved as `/data/plugins/WorldEdit/config.yml`.
!!! note
The downloaded files can be further processed using [environment variable replacement](interpolating.md) or [patch definitions](interpolating.md#patching-existing-files)
## Enable timestamps in init logs
Before the container starts the Minecraft Server its output is prefixed with `[init]`, such as
```
[init] Starting the Minecraft server...
```
To also include the timestamp with each log, set `LOG_TIMESTAMP` to "true". The log output will then look like:
```
[init] 2022-02-05 16:58:33+00:00 Starting the Minecraft server...
```

View File

@@ -396,43 +396,51 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
### Other server property mappings
| Environment Variable | Server Property |
|-----------------------------------|-------------------------------------------------------------------------------------------------------------------|
| ACCEPTS_TRANSFERS | [accepts-transfers](https://minecraft.wiki/w/Server.properties#accepts-transfers) |
| ALLOW_FLIGHT | [allow-flight](https://minecraft.wiki/w/Server.properties#allow-flight) |
| ALLOW_NETHER | [allow-nether](https://minecraft.wiki/w/Server.properties#allow-nether) |
| BROADCAST_CONSOLE_TO_OPS | [broadcast-console-to-ops](https://minecraft.wiki/w/Server.properties#broadcast-console-to-ops) |
| BROADCAST_RCON_TO_OPS | [broadcast-rcon-to-ops](https://minecraft.wiki/w/Server.properties#broadcast-rcon-to-ops) |
| BUG_REPORT_LINK | [bug-report-link](https://minecraft.wiki/w/Server.properties#bug-report-link) |
| ENABLE_COMMAND_BLOCK | [enable-command-block](https://minecraft.wiki/w/Server.properties#enable-command-block) |
| ENABLE_STATUS | [enable-status](https://minecraft.wiki/w/Server.properties#enable-status) |
| ENFORCE_SECURE_PROFILE | [enforce-secure-profile](https://minecraft.wiki/w/Server.properties#enforce-secure-profile) |
| ENTITY_BROADCAST_RANGE_PERCENTAGE | [entity-broadcast-range-percentage](https://minecraft.wiki/w/Server.properties#entity-broadcast-range-percentage) |
| FORCE_GAMEMODE | [force-gamemode](https://minecraft.wiki/w/Server.properties#force-gamemode) |
| FUNCTION_PERMISSION_LEVEL | [function-permission-level](https://minecraft.wiki/w/Server.properties#function-permission-level) |
| GENERATE_STRUCTURES | [generate-structures](https://minecraft.wiki/w/Server.properties#generate-structures) |
| HARDCORE | [hardcore](https://minecraft.wiki/w/Server.properties#hardcore) |
| 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) |
| 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_TICK_TIME | [max-tick-time](https://minecraft.wiki/w/Server.properties#max-tick-time) |
| MAX_WORLD_SIZE | [max-world-size](https://minecraft.wiki/w/Server.properties#max-world-size) |
| NETWORK_COMPRESSION_THRESHOLD | [network-compression-threshold](https://minecraft.wiki/w/Server.properties#network-compression-threshold) |
| ONLINE_MODE | [online-mode](https://minecraft.wiki/w/Server.properties#online-mode) |
| OP_PERMISSION_LEVEL | [op-permission-level](https://minecraft.wiki/w/Server.properties#op-permission-level) |
| PAUSE_WHEN_EMPTY_SECONDS | [pause-when-empty-seconds](https://minecraft.wiki/w/Server.properties#pause-when-empty-seconds) |
| PLAYER_IDLE_TIMEOUT | [player-idle-timeout](https://minecraft.wiki/w/Server.properties#player-idle-timeout) |
| PREVENT_PROXY_CONNECTIONS | [prevent-proxy-connections](https://minecraft.wiki/w/Server.properties#prevent-proxy-connections) |
| PVP | [pvp](https://minecraft.wiki/w/Server.properties#pvp) |
| RATE_LIMIT | [rate-limit](https://minecraft.wiki/w/Server.properties#rate-limit) |
| REGION_FILE_COMPRESSION | [region-file-compression](https://minecraft.wiki/w/Server.properties#region-file-compression) |
| RESOURCE_PACK_ID | [resource-pack-id](https://minecraft.wiki/w/Server.properties#resource-pack-id) |
| RESOURCE_PACK_PROMPT | [resource-pack-prompt](https://minecraft.wiki/w/Server.properties#resource-pack-prompt) |
| SERVER_NAME | [server-name](https://minecraft.wiki/w/Server.properties#server-name) |
| 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_PROTECTION | [spawn-protection](https://minecraft.wiki/w/Server.properties#spawn-protection) |
| 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) |
| VIEW_DISTANCE | [view-distance](https://minecraft.wiki/w/Server.properties#view-distance) |
| Environment Variable | Server Property |
|-----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| ACCEPTS_TRANSFERS | [accepts-transfers](https://minecraft.wiki/w/Server.properties#accepts-transfers) |
| ALLOW_FLIGHT | [allow-flight](https://minecraft.wiki/w/Server.properties#allow-flight) |
| ALLOW_NETHER | [allow-nether](https://minecraft.wiki/w/Server.properties#allow-nether) |
| BROADCAST_CONSOLE_TO_OPS | [broadcast-console-to-ops](https://minecraft.wiki/w/Server.properties#broadcast-console-to-ops) |
| BROADCAST_RCON_TO_OPS | [broadcast-rcon-to-ops](https://minecraft.wiki/w/Server.properties#broadcast-rcon-to-ops) |
| BUG_REPORT_LINK | [bug-report-link](https://minecraft.wiki/w/Server.properties#bug-report-link) |
| ENABLE_COMMAND_BLOCK | [enable-command-block](https://minecraft.wiki/w/Server.properties#enable-command-block) |
| ENABLE_STATUS | [enable-status](https://minecraft.wiki/w/Server.properties#enable-status) |
| ENFORCE_SECURE_PROFILE | [enforce-secure-profile](https://minecraft.wiki/w/Server.properties#enforce-secure-profile) |
| ENTITY_BROADCAST_RANGE_PERCENTAGE | [entity-broadcast-range-percentage](https://minecraft.wiki/w/Server.properties#entity-broadcast-range-percentage) |
| FORCE_GAMEMODE | [force-gamemode](https://minecraft.wiki/w/Server.properties#force-gamemode) |
| FUNCTION_PERMISSION_LEVEL | [function-permission-level](https://minecraft.wiki/w/Server.properties#function-permission-level) |
| GENERATE_STRUCTURES | [generate-structures](https://minecraft.wiki/w/Server.properties#generate-structures) |
| HARDCORE | [hardcore](https://minecraft.wiki/w/Server.properties#hardcore) |
| 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) |
| 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) |
| MANAGEMENT_SERVER_SECRET | [management-server-secret](https://minecraft.wiki/w/Server.properties#management-server-secret) |
| MANAGEMENT_SERVER_TLS_ENABLED | [management-server-tls-enabled](https://minecraft.wiki/w/Server.properties#management-server-tls-enabled) |
| MANAGEMENT_SERVER_TLS_KEYSTORE | [management-server-tls-keystore](https://minecraft.wiki/w/Server.properties#management-server-tls-keystore) |
| MANAGEMENT_SERVER_TLS_KEYSTORE_PASSWORD | [management-server-tls-keystore-password](https://minecraft.wiki/w/Server.properties#management-server-tls-keystore-password) |
| 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_TICK_TIME | [max-tick-time](https://minecraft.wiki/w/Server.properties#max-tick-time) |
| MAX_WORLD_SIZE | [max-world-size](https://minecraft.wiki/w/Server.properties#max-world-size) |
| NETWORK_COMPRESSION_THRESHOLD | [network-compression-threshold](https://minecraft.wiki/w/Server.properties#network-compression-threshold) |
| ONLINE_MODE | [online-mode](https://minecraft.wiki/w/Server.properties#online-mode) |
| OP_PERMISSION_LEVEL | [op-permission-level](https://minecraft.wiki/w/Server.properties#op-permission-level) |
| PAUSE_WHEN_EMPTY_SECONDS | [pause-when-empty-seconds](https://minecraft.wiki/w/Server.properties#pause-when-empty-seconds) |
| PLAYER_IDLE_TIMEOUT | [player-idle-timeout](https://minecraft.wiki/w/Server.properties#player-idle-timeout) |
| PREVENT_PROXY_CONNECTIONS | [prevent-proxy-connections](https://minecraft.wiki/w/Server.properties#prevent-proxy-connections) |
| PVP | [pvp](https://minecraft.wiki/w/Server.properties#pvp) |
| RATE_LIMIT | [rate-limit](https://minecraft.wiki/w/Server.properties#rate-limit) |
| REGION_FILE_COMPRESSION | [region-file-compression](https://minecraft.wiki/w/Server.properties#region-file-compression) |
| RESOURCE_PACK_ID | [resource-pack-id](https://minecraft.wiki/w/Server.properties#resource-pack-id) |
| RESOURCE_PACK_PROMPT | [resource-pack-prompt](https://minecraft.wiki/w/Server.properties#resource-pack-prompt) |
| SERVER_NAME | [server-name](https://minecraft.wiki/w/Server.properties#server-name) |
| 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_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) |
| 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) |

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -47,20 +47,20 @@ popd
Using the baseline image, an interactive container can be started to iteratively run the scripts to be developed. By attaching the current workspace directory, you can use the local editor of your choice to iteratively modify scripts while using the container to run them.
```shell
docker run -it --rm -v ${PWD}:/scripts -e SCRIPTS=/scripts/ --entrypoint bash mc-dev
docker run -it --rm -v ${PWD}:/image/scripts --entrypoint bash mc-dev
```
From within the container you can run individual scripts via the attached `/scripts/` path; however, be sure to set any environment variables expected by the scripts by either `export`ing them manually:
From within the container you can run individual scripts via the attached `/image/scripts/` path; however, be sure to set any environment variables expected by the scripts by either `export`ing them manually:
```shell
export VERSION=1.12.2
/scripts/start-magma
/image/scripts/start-deployFabric
```
...or pre-pending script execution:
```shell
VERSION=1.12.2 /scripts/start-magma
VERSION=1.12.2 /image/scripts/start-deployFabric
```
!!! note
@@ -69,15 +69,28 @@ VERSION=1.12.2 /scripts/start-magma
## Using development copy of tools
In the cloned repo, such as [`mc-image-helper`](https://github.com/itzg/mc-image-helper), create an up-to-date snapshot build of the tgz distribution using:
In the cloned repo, such as [`mc-image-helper`](https://github.com/itzg/mc-image-helper), install the distribution locally by running:
```shell
./gradlew distTar
./gradlew installDist
```
!!! note
The distribution will be installed in the project's `build/install/mc-image-helper`. Obtain the absolute path to that directory use in the next step.
The distribution's version will be `0.0.0-<branch>-SNAPSHOT`
Refer to the instructions above to mount any locally modified image scripts or build a local copy of the image using or with alternate `BASE_IMAGE`, as described above:
```shell
docker build -t itzg/minecraft-server .
```
Mount the local mc-image-helper distribution directory as a volume in the container at the path `/usr/share/mc-image-helper`, such as
```shell
docker run -it --rm \
-v /path/to/mc-image-helper/build/install/mc-image-helper:/usr/share/mc-image-helper \
-e EULA=true \
itzg/minecraft-server
```
For Go base tools, run

View File

@@ -7,14 +7,14 @@ CONTAINER ID IMAGE COMMAND CREATED
b418af073764 mc "/start" 43 seconds ago Up 41 seconds (healthy) 0.0.0.0:25565->25565/tcp, 25575/tcp mc
```
You can also query the container's health in a script friendly way:
You can also query the container's health in a script-friendly way:
``` shell
> docker container inspect -f "{{.State.Health.Status}}" mc
healthy
```
There's actually a wrapper script called `mc-health` that takes care of calling `mc-monitor status` with the correct arguments. If needing to customize the health checks parameters, such as in a compose file, then use something like the following in the service declaration:
There's actually a wrapper script called `mc-health` that takes care of calling `mc-monitor status` with the correct arguments. If needing to customize the health checks parameters, such as in a Compose file, then use something like the following in the service declaration:
``` yaml
healthcheck:
@@ -24,9 +24,16 @@ healthcheck:
retries: 20
```
Some orchestration systems, such as Portainer, don't allow for disabling the default `HEALTHCHECK` declared by this image. In those cases you can approximate the disabling of healthchecks by setting the environment variable `DISABLE_HEALTHCHECK` to `true`.
Some orchestration systems, such as Portainer, don't allow for disabling the default `HEALTHCHECK` declared by this image. In those cases you can approximate the disabling of health checks by setting the environment variable `DISABLE_HEALTHCHECK` to `true`.
### Healthchecks for older versions
The [health check in a Compose service declaration](https://docs.docker.com/reference/compose-file/services/#healthcheck) can also be disabled using:
This container disables Healthchecks for Versions before b1.8 as those versions do not support any kind of server pinging.
For more information see [Server List Ping](https://wiki.vg/Server_List_Ping#Beta_1.8_to_1.3)
```yaml
healthcheck:
disable: true
test: ["NONE"]
```
### Health checks for older versions
This container disables health checks for Minecraft versions before b1.8 as those versions do not support any kind of server pinging. For more information see [Server List Ping](https://minecraft.wiki/w/Java_Edition_protocol/Server_List_Ping#Beta_1.8_to_1.3).

View File

@@ -133,6 +133,14 @@ The newline delimiting allows for compose file usage like:
https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot
```
!!! note "Auto-removal"
Entries that are removed from the `MODS` or `PLUGINS` list will be automatically removed from the `mods` or `plugins` directory. This is useful for removing mods/plugins that are no longer needed. An empty `MODS` or `PLUGINS` list will remove all mods/plugins.
!!! note "Disable processing"
To temporarily disable processing of the `MODS` or `PLUGINS` list, then comment out the `MODS` or `PLUGINS` environment variable.
## Mod/Plugin URL Listing File
As an alternative to `MODS`/`PLUGINS`, the variable `MODS_FILE` or `PLUGINS_FILE` can be set with the container path or URL of a text file listing a mod/plugin URLs on each line. For example, the following

View File

@@ -2,28 +2,46 @@
[Modrinth](https://modrinth.com/) is an open source modding platform with a clean, easy to use website for finding [Fabric, Forge, etc mods](https://modrinth.com/mods) and [Paper, etc plugins](https://modrinth.com/plugins), and [datapacks](https://modrinth.com/datapacks). At startup, the container will automatically locate and download the newest versions of mod/plugin files that correspond to the `TYPE` and `VERSION` in use. Older file versions downloaded previously will automatically be cleaned up.
- **MODRINTH_PROJECTS** : comma or newline separated list of project slugs (short name) or IDs. The project ID is located in the "Technical information" section. The project slug is the part of the URL that follows `/mod/`, `/plugin/`, or `/datapack/`. For example:
```
## Usage
To use this feature, set the environment variable `MODRINTH_PROJECTS` to a comma or newline separated list of project slugs (short name) or IDs.
!!! tip "Project ID"
The project ID can be copied to the clipboard from the project page menu:
![Modrinth copy project ID](../img/modrinth-copy-project-id.png)
!!! tip "Project Slug"
The project slug is the part of the URL that follows `/mod/`, `/plugin/`, or `/datapack/`. For example:
```
https://modrinth.com/mod/fabric-api
----------
|
+-- project slug
```
Also, a specific version (or release type) can be declared adding a colon and then the version id, version number/name, or release type after the project slug. The version ID or number can be found in the 'Metadata' section. Valid release types are `release`, `beta`, `alpha`.
To select a datapack from a Modrinth project, prefix the entry with "datapack:". When running a vanilla server, this is optional since only datapacks will be available for vanilla servers to select.
You can also reference a file containing project entries by prefixing the **container path** path with `@`.
| Description | Example projects entry |
|---------------------------------|-------------------------------------------------------|
| Select latest version | `fabric-api` |
| Select specific version | `fabric-api:bQZpGIz0`<br/>`fabric-api:0.119.2+1.21.4` |
| Select latest beta version | `fabric-api:beta` |
| Latest version using project ID | `P7dR8mSH` |
| Latest version of datapack | `datapack:terralith` |
| Specific version of datapack | `datapack:terralith:2.5.5` |
| Projects Listing File | `@/path/to/modrinth-mods.txt` |
```
Also, a specific version (or release type) can be declared by adding a colon and then the version id, version number/name, or release type after the project slug. The version ID or number can be found in the 'Metadata' section. Valid release types are `release`, `beta`, `alpha`.
To select a datapack from a Modrinth project, prefix the entry with "datapack:". When running a vanilla server, this is optional since only datapacks will be available for vanilla servers to select.
You can also reference a file containing project entries by prefixing the **container path** path with `@`.
### Examples
| Description | Example projects entry |
|---------------------------------|-------------------------------------------------------|
| Select latest version | `fabric-api` |
| Select specific version | `fabric-api:bQZpGIz0`<br/>`fabric-api:0.119.2+1.21.4` |
| Select latest beta version | `fabric-api:beta` |
| Latest version using project ID | `P7dR8mSH` |
| Latest version of datapack | `datapack:terralith` |
| Specific version of datapack | `datapack:terralith:2.5.5` |
| Projects Listing File | `@/path/to/modrinth-mods.txt` |
### Notes
!!! info "More about listing files"
@@ -42,6 +60,14 @@
datapack:terralith
```
!!! note "Auto-removal"
Entries that are removed from the `MODRINTH_PROJECTS` list will be automatically removed from the `mods` or `plugins` directory. This is useful for removing mods/plugins that are no longer needed. An empty `MODRINTH_PROJECTS` list will remove all mods/plugins.
!!! note "Disable processing"
To temporarily disable processing of the `MODRINTH_PROJECTS` list, then comment out the `MODRINTH_PROJECTS` environment variable.
## Version from Projects
When the environment variable `VERSION_FROM_MODRINTH_PROJECTS` is set to "true" the Minecraft [`VERSION`](../versions/minecraft.md) will be automatically determined by looking at the most recent version of Minecraft that is supported by all the projects provided in `MODRINTH_PROJECTS`.

View File

@@ -1,6 +1,6 @@
mkdocs-material == 9.6.16
mkdocs-autorefs == 1.4.2
mkdocstrings[python] == 0.30.0
mkdocs-material == 9.6.21
mkdocs-autorefs == 1.4.3
mkdocstrings[python] == 0.30.1
mkdocs-literate-nav == 0.6.2
mdx-gh-links == 0.4
mkdocs-click == 0.9.0

View File

@@ -12,6 +12,7 @@ To manage a CurseForge modpack automatically with upgrade support, pinned or lat
Example if your key is `$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa`:
```yaml
# compose.yaml
environment:
CF_API_KEY: '$$11$$22$$33aaaaaaaaaaaaaaaaaaaaaaaaaa'
```
@@ -21,17 +22,35 @@ To manage a CurseForge modpack automatically with upgrade support, pinned or lat
docker run ... -e CF_API_KEY='$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa'
```
To avoid exposing the API key, it is highly recommended to use a `.env` file, which is [loaded automatically by docker compose](https://docs.docker.com/compose/environment-variables/set-environment-variables/#substitute-with-an-env-file). `$`'s in the value still need to escaped with a second `$` and the variable needs to be referenced from the compose file, such as:
To avoid exposing the API key, it is highly recommended to use a `.env` file, which is [loaded automatically by docker compose](https://docs.docker.com/compose/environment-variables/set-environment-variables/#substitute-with-an-env-file). You **do not** need to escape `$`'s with a second `$` in the `.env` file **as long as the key is wrapped in single quotes**.
```
# .env
CF_API_KEY='$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa'
```
The variable should to be referenced from the compose file, such as:
```yaml
# compose.yaml
environment:
CF_API_KEY: ${CF_API_KEY}
```
The .env file should be placed in the same directory as your compose file like so:
```
/minecraft-server
├── .env
├── compose.yaml
├── /data
```
To use the equivalent with `docker run` you need to specify the `.env` file explicitly:
```
docker run --env-file=.env itzg/minecraft-server
```
Alternately you can use [docker secrets](https://docs.docker.com/compose/how-tos/use-secrets/) with a `CF_API_KEY_FILE` environment variable:
```
service:
@@ -39,7 +58,7 @@ To manage a CurseForge modpack automatically with upgrade support, pinned or lat
CF_API_KEY_FILE: /run/secrets/cf_api_key
secrets:
- cf_api_key
secrets:
cf_api_key:
file: cf_api_key.secret

View File

@@ -45,6 +45,11 @@ In both of the cases above, there is no need for the `VERSION` or `FORGE_VERSION
If an error occurred while installing Forge, it might be possible to resolve by temporarily setting `FORGE_FORCE_REINSTALL` to "true". Be sure to remove that variable after successfully starting the server.
URLs configurable via environment variables:
- `FORGE_PROMOTIONS_URL`: default is https://files.minecraftforge.net/net/minecraftforge/forge/promotions_slim.json
- `FORGE_MAVEN_REPO_URL`: default is https://maven.minecraftforge.net
## Alternatives
### NeoForge

View File

@@ -14,8 +14,8 @@ where `<tag>` refers to the first column of this table:
|----------------|--------------|--------|--------------------|---------------------|------|
| latest | 21 | Ubuntu | Hotspot | amd64, arm64 | |
| stable | 21 | Ubuntu | Hotspot | amd64, arm64 | |
| java24 | 24 | Ubuntu | Hotspot | amd64, arm64 | (2) |
| java24-graalvm | 24 | Oracle | Oracle GraalVM (3) | amd64, arm64 | (2) |
| java25 | 25 | Ubuntu | Hotspot | amd64, arm64 | |
| java25-graalvm | 25 | Oracle | Oracle GraalVM (3) | amd64, arm64 | |
| java21 | 21 | Ubuntu | Hotspot | amd64, arm64 | |
| java21-jdk | 21 | Ubuntu | Hotspot+JDK | amd64, arm64 | |
| java21-alpine | 21 | Alpine | Hotspot | amd64, arm64 | |
@@ -137,5 +137,10 @@ The following image tags have been deprecated and are no longer receiving update
- java19
- java20-graalvm, java20, java20-alpine
- java23-*
- java24, java24-graalvm
- java8-multiarch is still built and pushed, but please move to java8 instead
- java8-alpine, java8-jdk, java8-openj9, java8-graalvm-ce
## JSON Listing
Information about the image tags is available programmatically at <https://raw.githubusercontent.com/itzg/docker-minecraft-server/refs/heads/master/images.json>

View File

@@ -9,6 +9,7 @@ services:
EULA: true
ALLOW_FLIGHT: true
MOD_PLATFORM: AUTO_CURSEFORGE
CF_API_KEY: ${CF_API_KEY}
CF_SLUG: craftoria
MOTD: |
A %TYPE% server on %VERSION%

View File

@@ -0,0 +1,16 @@
services:
mc:
image: itzg/minecraft-server:java8
environment:
EULA: "true"
MODPACK_PLATFORM: AUTO_CURSEFORGE
CF_SLUG: skyfactory-4
CF_FILENAME_MATCHER: 4.2.4
CF_API_KEY: ${CF_API_KEY}
MEMORY: 3G
ports:
- "25565:25565"
volumes:
- mc-data:/data
volumes:
mc-data:

View File

@@ -1,157 +0,0 @@
####################################################################
# FORGE GENERIC_PACK #
# #
# Date: 20220828 #
# #
# Mod: TNP Limitless 5 v2.19.0 #
# #
# Notes: Verify that there is no EULA file in the modpack.zip #
# if you do not delete it the EULA flag below will be #
# overwritten when the modpack is copied and the server #
# will not start. #
# #
####################################################################
services:
####################################################################
# Service Name #
# #
# Define Service Name here. If using RCON this name will be #
# referenced again as RWA_RCON_HOST below. #
# #
# Example: 'name:' or 'mc_atm6:' #
####################################################################
mc_tnp5:
####################################################################
# Image & Container Name #
# #
# Specify Image Name and Java Version. The 'image' will always be #
# 'itzg/minecraft-server' however the tag added to the end is #
# where you can specify the java version or container architecture.#
# See readme.md for a full list. #
# #
# 'container_name:' This can be anything you like. This is the name#
# that will show when you run 'docker ps' commands. #
####################################################################
image: itzg/minecraft-server
container_name: mc_tnp5
####################################################################
# Server Ports #
# #
# Specify external port. #
####################################################################
ports:
- 25565:25565
####################################################################
# Automatic Server Restart #
# #
# Define a restart policy here. #
# - 'no' = Do not restart. #
# - 'on-failure' = Restart if container exits because an error. #
# - 'always' = Regardless of stop reason. #
# - 'unless-stopped' = Similar to always except if stopped. #
####################################################################
restart: unless-stopped
####################################################################
# Volume and Folder Access #
# #
# This section defines what folders and volumes you want to give #
# this container access to. It is recommended to leaves these set #
# to the default values unless you know what you are doing. #
# #
# Place your mod zip file in a folder called 'modpacks' in the #
# same directory you place this docker-compose file. #
# #
# Specify the data volume name or directory here as well. #
# In this example the volume name is 'data'. When docker creates #
# the volume it will add what ever name you give it here to the #
# end of the container name specified above. In this example it #
# would be named 'mc_atm6_data'. If you change this be sure to #
# update the volume name at the bottom of this config. #
####################################################################
volumes:
- ./modpacks:/modpacks:ro
- data:/data
####################################################################
# EULA #
# #
# Accept EULA by setting to "true" #
####################################################################
environment:
EULA: "true"
####################################################################
# FORGE INSTALL #
# #
# Sets install type to FORGE and specifys the zip folder name #
# and location of your mod pack. #
# #
# TYPE: Defines the install type as FORGE #
# #
# VERSION: Defines the version of MC the modpack is based on. #
# #
# FORGE_VERSION: Defines the version of FORGE the modpack uses. #
# This can usually be found in the modpack.zip as #
# installer.jar #
# #
# GENERIC_PACK: Define where the modpack.zip is located. #
# #
# Place your mod zip file in a folder called 'modpacks' in the #
# same directory you place this docker-compose file. #
####################################################################
TYPE: FORGE
VERSION: 1.18.2
FORGE_VERSION: 40.1.73
GENERIC_PACK: /modpacks/tnp5.zip
####################################################################
# Server Memory #
# #
# Set Maximum amount of memory allowed for your server. #
####################################################################
MEMORY: "8G"
####################################################################
# Logging Options #
# #
# Set to "true" to delete old logs #
####################################################################
ENABLE_ROLLING_LOGS: "true"
####################################################################
# Server Timezone #
# #
# Specify server Timezone #
####################################################################
TZ: "America/New_York"
####################################################################
# Minecraft Game Options #
# #
# List any game options you want to define here. A full list can #
# be found on the readme.md page on github. #
####################################################################
OVERRIDE_SERVER_PROPERTIES: "true"
DIFFICULTY: "easy"
MAX_TICK_TIME: "-1"
VIEW_DISTANCE: "6"
ALLOW_FLIGHT: "true"
OPS: ""
MAX_PLAYERS: 10
PVP: "false"
LEVEL_TYPE: "biomesoplenty"
MOTD: "Welcome Home"
####################################################################
# Volumes #
# #
# Define data volume name here. You should leave this set to the #
# default. #
####################################################################
volumes:
data:

View File

@@ -1,19 +0,0 @@
services:
mc:
image: itzg/minecraft-server:${IMAGE_TAG:-latest}
volumes:
- data:/data
- ./modpacks:/modpacks:ro
environment:
EULA: "true"
TYPE: FORGE
DEBUG: "${DEBUG:-false}"
VERSION: ${VERSION:-1.17.1}
FORGE_VERSION: ${FORGE_VERSION:-37.0.90}
GENERIC_PACK: /modpacks/${MODPACK:-Server-Files-0.0.21.zip}
REMOVE_OLD_MODS: "${REMOVE_OLD_MODS:-false}"
ports:
- "25565:25565"
volumes:
data: {}

View File

@@ -12,6 +12,9 @@ services:
# Use Pack ID from https://www.feed-the-beast.com/modpacks/119-ftb-presents-direwolf20-120?tab=about
FTB_MODPACK_ID: "119"
# FTB_MODPACK_VERSION_ID: ""
MOTD: |
An FTB server running
%MODPACK_NAME% version %MODPACK_VERSION%
MEMORY: 4G
volumes:
# use a named, managed volume for data volume

View File

@@ -9,15 +9,24 @@ services:
environment:
EULA: "TRUE"
TYPE: CUSTOM
GENERIC_PACKS: GT_New_Horizons_2.7.2_Server_Java_17-21
GENERIC_PACKS: GT_New_Horizons_2.8.0_Server_Java_17-25
GENERIC_PACKS_SUFFIX: .zip
GENERIC_PACKS_PREFIX: https://downloads.gtnewhorizons.com/ServerPacks/
# if this isn't true, then the container tries to download the modpack every run
SKIP_GENERIC_PACK_UPDATE_CHECK: "true"
MEMORY: 6G
# Make sure that this matches what is in your pack's startserver bash file
JVM_OPTS: -Dfml.readTimeout=180 @java9args.txt
CUSTOM_JAR_EXEC: -jar lwjgl3ify-forgePatches.jar nogui
JVM_OPTS: "-Dfml.readTimeout=180 @java9args.txt"
CUSTOM_SERVER: "lwjgl3ify-forgePatches.jar"
# Set server.properties according to GTNH server defaults
MOTD: "GT:New Horizons 2.8.0"
DIFFICULTY: "hard"
ENABLE_COMMAND_BLOCK: "true"
SPAWN_PROTECTION: 1
VIEW_DISTANCE: 8
MODE: 0
LEVEL_TYPE: "rwg"
ALLOW_FLIGHT: "TRUE"
volumes:
# attach a managed volume, change to a relative or absolute host directory if needed
- mc-data:/data

View File

@@ -10,6 +10,6 @@ services:
griefprevention
discordsrv
VERSION_FROM_MODRINTH_PROJECTS: true
SETUP_ONLY: true
MEMORY: 2G
ports:
- "25565:25565"

View File

@@ -7,7 +7,7 @@ services:
EULA: "TRUE"
TYPE: MOHIST
VERSION: 1.12.2
DEBUG: "true"
MOHIST_BUILD: 347
volumes:
- data:/data

View File

@@ -1,188 +1,204 @@
{
"globalExcludes": [
"advancement-plaques",
"ambience-music-mod",
"ambientsounds",
"appleskin",
"armor-chroma",
"armor-toughness-bar",
"audio-extension-for-fancymenu-forge",
"auudio-forge",
"beehivetooltips",
"better-advancements",
"better-foliage",
"better-modlist-neoforge",
"better-placement",
"better-sprinting",
"better-third-person",
"better-tips-nbt-tag",
"betterf3",
"betterfps",
"bettergrassify",
"biomeinfo",
"block-drops-jei-addon",
"blur-forge",
"cartography",
"chattoggle",
"cherished-worlds",
"chunk-animator",
"clickable-advancements",
"compass-coords",
"config-menus-forge",
"configured",
"controllable",
"controlling",
"craftpresence",
"ctm",
"custom-main-menu",
"dark-mode-everywhere",
"defensive-measures",
"ding",
"distraction-free-recipes",
"drippy-loading-screen",
"dynamic-surroundings",
"dynamic-view",
"dynamiclights-reforged",
"easiervillagertrading",
"effective-forge",
"embeddium",
"embeddium-extension",
"embeddium-extras",
"enchantment-descriptions",
"enhanced-boss-bars",
"enhancedvisuals",
"entity-collision-fps-fix",
"entity-model-features",
"entity-texture-features-fabric",
"entityculling",
"equipment-compare",
"essential-mod",
"euphoria-patches",
"extreme-sound-muffler",
"ezzoom",
"fading-night-vision",
"falling-leaves-forge",
"fancymenu",
"farsight",
"faster-ladder-climbing",
"fastquit",
"fastquit-forge",
"flerovium",
"foamfix-optimization-mod",
"forgeskyboxes",
"fps-reducer",
"free-cam",
"ftb-backups-2",
"fullscreen-windowed-borderless-for-minecraft",
"hwyla",
"iceberg",
"ignitioncoil",
"illager-raid-music",
"inmisaddon",
"iris-flywheel-compat",
"irisshaders",
"item-borders",
"item-highlighter",
"item-obliterator",
"itemphysic-lite",
"itemzoom",
"just-enough-harvestcraft",
"just-enough-mekanism-multiblocks",
"just-enough-resources-jer",
"just-zoom",
"legendary-tooltips",
"lighty",
"loot-capacitor-tooltips",
"loot-journal",
"lootbeams",
"magnesium-extras",
"make-bubbles-pop",
"menumobs",
"minecraft-rich-presence",
"model-gap-fix",
"more-overlays",
"mouse-tweaks",
"neat",
"nekos-enchanted-books",
"no-nv-flash",
"no-recipe-book",
"not-enough-animations",
"oculus",
"oldjavawarning",
"overloaded-armor-bar",
"packmenu",
"packmodemenu",
"particle-effects",
"particle-effects-reforged",
"particular",
"particular-reforged",
"reauth",
"rebind-narrator",
"reblured",
"reeses-sodium-options",
"reforgium",
"resource-reloader",
"rubidium",
"rubidium-extra",
"ryoamiclights",
"schematica",
"seamless-loading-screen",
"seamless-loading-screen-forge",
"searchables",
"seasonhud",
"shulkerboxviewer",
"skin-layers-3d",
"smart-hud",
"smithing-template-viewer",
"smooth-font",
"smoothwater",
"sodium",
"sodium-extra",
"sodium-options-api",
"sodium-rubidium-occlusion-culling-fix",
"sound",
"sound-filters",
"sound-physics-remastered",
"sound-reloader",
"stellar-sky",
"swingthroughgrass",
"textrues-embeddium-options",
"textrues-rubidium-options",
"thaumic-jei",
"tips",
"toast-control",
"torohealth-damage-indicators",
"true-darkness",
"ungrab-mouse-mod",
"vanillafix",
"visuality",
"waila-harvestability",
"wakes-reforged",
"wawla",
"welcome-screen",
"xaeroplus",
"yungs-menu-tweaks",
"zume"
],
"modpacks": {
"all-of-fabric-6": {
"forceIncludes": ["revelationary"]
},
"beyond-depth": {
"forceIncludes": ["particular-reforged"]
},
"create-arcane-engineering": {
"forceIncludes": ["just-enough-resources-jer"]
},
"skyfactory-5": {
"forceIncludes": [
"colored-torches",
"dye-mob-dye",
"openstairs"
]
},
"valhelsia-5": {
"excludes": ["modernfix"]
}
}
}
{
"globalExcludes": [
"advancement-plaques",
"ambience-music-mod",
"ambientsounds",
"appleskin",
"armor-chroma",
"armor-toughness-bar",
"audio-extension-for-fancymenu-forge",
"auudio-forge",
"beehivetooltips",
"better-advancements",
"better-foliage",
"better-modlist-neoforge",
"better-placement",
"better-sprinting",
"better-third-person",
"better-tips-nbt-tag",
"betterf3",
"betterfps",
"bettergrassify",
"biomeinfo",
"block-drops-jei-addon",
"blur-forge",
"cartography",
"chattoggle",
"cherished-worlds",
"chunk-animator",
"clickable-advancements",
"colorwheel",
"colorwheel-patcher",
"compass-coords",
"config-menus-forge",
"configured",
"controllable",
"controlling",
"craftpresence",
"ctm",
"custom-main-menu",
"dark-mode-everywhere",
"defensive-measures",
"ding",
"distraction-free-recipes",
"drippy-loading-screen",
"dynamic-surroundings",
"dynamic-view",
"dynamiclights-reforged",
"easiervillagertrading",
"effective-forge",
"embeddium",
"embeddium-extension",
"embeddium-extras",
"enchantment-descriptions",
"enhanced-boss-bars",
"enhancedvisuals",
"entity-collision-fps-fix",
"entity-model-features",
"entity-texture-features-fabric",
"entityculling",
"equipment-compare",
"essential-mod",
"euphoria-patches",
"extreme-sound-muffler",
"ezzoom",
"fading-night-vision",
"falling-leaves-forge",
"fancymenu",
"farsight",
"faster-ladder-climbing",
"fastquit",
"fastquit-forge",
"flerovium",
"foamfix-optimization-mod",
"forgeskyboxes",
"fps-reducer",
"free-cam",
"ftb-backups-2",
"fullscreen-windowed-borderless-for-minecraft",
"hwyla",
"iceberg",
"ignitioncoil",
"illager-raid-music",
"inmisaddon",
"iris-flywheel-compat",
"irisshaders",
"item-borders",
"item-highlighter",
"item-obliterator",
"itemphysic-lite",
"itemzoom",
"just-enough-harvestcraft",
"just-enough-mekanism-multiblocks",
"just-enough-resources-jer",
"just-zoom",
"legendary-tooltips",
"lighty",
"loot-capacitor-tooltips",
"loot-journal",
"lootbeams",
"magnesium-extras",
"make-bubbles-pop",
"menumobs",
"minecraft-rich-presence",
"model-gap-fix",
"more-overlays",
"mouse-tweaks",
"neat",
"nekos-enchanted-books",
"no-nv-flash",
"no-recipe-book",
"not-enough-animations",
"oculus",
"ok-zoomer",
"oldjavawarning",
"overloaded-armor-bar",
"packmenu",
"packmodemenu",
"particle-effects",
"particle-effects-reforged",
"particle-rain",
"particular",
"particular-reforged",
"reauth",
"rebind-narrator",
"reblured",
"reeses-sodium-options",
"reforgium",
"resource-reloader",
"rubidium",
"rubidium-extra",
"ryoamiclights",
"schematica",
"seamless-loading-screen",
"seamless-loading-screen-forge",
"searchables",
"seasonhud",
"shulkerboxviewer",
"skin-layers-3d",
"smart-hud",
"smithing-template-viewer",
"smooth-font",
"smoothwater",
"sodium",
"sodium-extra",
"sodium-options-api",
"sodium-rubidium-occlusion-culling-fix",
"sound",
"sound-filters",
"sound-physics-remastered",
"sound-reloader",
"stellar-sky",
"swingthroughgrass",
"textrues-embeddium-options",
"textrues-rubidium-options",
"thaumic-jei",
"tips",
"toast-control",
"torohealth-damage-indicators",
"true-darkness",
"ungrab-mouse-mod",
"vanillafix",
"visuality",
"waila-harvestability",
"waila-stages",
"wakes-reforged",
"wawla",
"welcome-screen",
"xaeroplus",
"yungs-menu-tweaks",
"zume"
],
"modpacks": {
"all-of-fabric-6": {
"forceIncludes": ["revelationary"]
},
"beyond-depth": {
"forceIncludes": ["particular-reforged"]
},
"create-arcane-engineering": {
"forceIncludes": ["just-enough-resources-jer"]
},
"mc-eternal-2": {
"forceIncludes": [
"particular-reforged",
"mob-player-animator"
]
},
"reclamation-reclaim-the-world": {
"forceIncludes": [
"more-overlays-updated"
]
},
"skyfactory-5": {
"forceIncludes": [
"colored-torches",
"dye-mob-dye",
"openstairs"
]
},
"valhelsia-5": {
"excludes": ["modernfix"]
}
}
}

View File

@@ -3,14 +3,14 @@
[unpauseMCServer-server]
sequence = 25565
seq_timeout = 1
command = /auto/resume.sh %IP%
command = /image/scripts/auto/resume.sh %IP%
tcpflags = syn
[unpauseMCServer-rcon]
sequence = 25575
seq_timeout = 1
command = /auto/resume.sh %IP%
command = /image/scripts/auto/resume.sh %IP%
tcpflags = syn
[unpauseMCServer-bedrock]
sequence = 19132:udp
command = /auto/resume.sh %IP%
command = /image/scripts/auto/resume.sh %IP%
seq_cooldown = 60

View File

@@ -10,8 +10,9 @@
"axolotlbuckets",
"BadOptimizations",
"BetterAdvancements",
"BetterGrassify",
"betterbeds",
"BetterF3",
"BetterGrassify",
"BetterThirdPerson",
"BHMenu",
"blur",
@@ -23,16 +24,22 @@
"cherishedworlds",
"citresewn",
"clickadv",
"cobblemon-ui-tweaks",
"compass-coords",
"colorwheel",
"connectedness",
"connector",
"continuity",
"controlling",
"craftpresence",
"cwb",
"DisableCustomWorldsAdvice",
"distraction_free_recipes",
"drippyloadingscreen",
"eating-animation",
"emi",
"emi_loot",
"emi_trade",
"emiffect",
"emitrades",
"entity_model_features",
@@ -52,6 +59,7 @@
"Highlighter",
"ImmediatelyFast",
"indium",
"inventory-profiles-next",
"iris",
"iris-flywheel",
"ItemBorders",
@@ -67,13 +75,16 @@
"nicer-skies",
"notenoughanimations",
"oculus",
"ok_zoomer",
"OverflowingBars",
"particlerain",
"PickUpNotifier",
"PresenceFootsteps",
"Prism",
"reforgium",
"reeses_sodium_options",
"reforgium",
"ResourcePackOverrides",
"roughly-enough-items",
"ryoamiclights",
"screenshot_viewer",
"Searchables",
@@ -82,14 +93,24 @@
"skinlayers3d",
"sodium",
"sorted_enchantments",
"tooltipfix",
"visuality",
"VR-Combat",
"WailaStages",
"welcomescreen",
"Xaeros_Minimap",
"XaerosWorldMap",
"YeetusExperimentus",
"yungsmenutweaks",
"Zoomify",
"zume"
],
"globalForceIncludes": [],
"modpacks": {}
"modpacks": {
"cobbleverse": {
"excludes": [
"cloth-config"
]
}
}
}

View File

@@ -28,6 +28,13 @@
"level-seed": {"env": "SEED"},
"level-type": {"env": "LEVEL_TYPE"},
"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"},
"management-server-secret": {"env": "MANAGEMENT_SERVER_SECRET"},
"management-server-tls-enabled": {"env": "MANAGEMENT_SERVER_TLS_ENABLED"},
"management-server-tls-keystore": {"env": "MANAGEMENT_SERVER_TLS_KEYSTORE"},
"management-server-tls-keystore-password": {"env": "MANAGEMENT_SERVER_TLS_KEYSTORE_PASSWORD"},
"max-build-height": {"env": "MAX_BUILD_HEIGHT"},
"max-chained-neighbor-updates": {"env": "MAX_CHAINED_NEIGHBOR_UPDATES"},
"max-players": {"env": "MAX_PLAYERS"},
@@ -61,6 +68,7 @@
"spawn-monsters": {"env": "SPAWN_MONSTERS"},
"spawn-npcs": {"env": "SPAWN_NPCS"},
"spawn-protection": {"env": "SPAWN_PROTECTION"},
"status-heartbeat-interval": {"env": "STATUS_HEARTBEAT_INTERVAL"},
"sync-chunk-writes": {"env": "SYNC_CHUNK_WRITES"},
"use-native-transport": {"env": "USE_NATIVE_TRANSPORT"},
"view-distance": {"env": "VIEW_DISTANCE"},

150
images.json Normal file
View File

@@ -0,0 +1,150 @@
[
{
"tag": "latest",
"notes": "Always tracks the most recent commit on the main branch",
"java": "21",
"distribution": "ubuntu",
"jvm": "hotspot",
"architectures": ["amd64", "arm64"],
"lts": true
},
{
"tag": "stable",
"notes": "Always tracks the most recent release",
"java": "21",
"distribution": "ubuntu",
"jvm": "hotspot",
"architectures": ["amd64", "arm64"],
"lts": true
},
{
"tag": "java25",
"java": "25",
"distribution": "ubuntu",
"jvm": "hotspot",
"architectures": ["amd64", "arm64"]
},
{
"tag": "java25-graalvm",
"java": "25",
"distribution": "oracle",
"jvm": "graalvm",
"architectures": ["amd64", "arm64"]
},
{
"tag": "java24",
"java": "24",
"distribution": "ubuntu",
"jvm": "hotspot",
"architectures": ["amd64", "arm64"],
"deprecated": true
},
{
"tag": "java24-graalvm",
"java": "24",
"distribution": "oracle",
"jvm": "graalvm",
"architectures": ["amd64", "arm64"],
"deprecated": true
},
{
"tag": "java21",
"java": "21",
"distribution": "ubuntu",
"jvm": "hotspot",
"architectures": ["amd64", "arm64"],
"lts": true
},
{
"tag": "java21-alpine",
"java": "21",
"distribution": "alpine",
"jvm": "hotspot",
"architectures": ["amd64", "arm64"]
},
{
"tag": "java21-graalvm",
"java": "21",
"distribution": "oracle",
"jvm": "graalvm",
"architectures": ["amd64", "arm64"]
},
{
"tag": "java21-jdk",
"java": "21",
"distribution": "ubuntu",
"jvm": "hotspot",
"architectures": ["amd64", "arm64"],
"jdk": true
},
{
"tag": "java21-graalvm",
"java": "21",
"distribution": "oracle",
"jvm": "graalvm",
"architectures": ["amd64", "arm64"]
},
{
"tag": "java17",
"java": "17",
"distribution": "ubuntu",
"jvm": "hotspot",
"architectures": ["amd64", "arm64"],
"lts": true
},
{
"tag": "java17-alpine",
"java": "17",
"distribution": "alpine",
"jvm": "hotspot",
"architectures": ["amd64", "arm64"]
},
{
"tag": "java17-graalvm",
"java": "17",
"distribution": "oracle",
"jvm": "graalvm",
"architectures": ["amd64", "arm64"]
},
{
"tag": "java16",
"java": "16",
"distribution": "ubuntu",
"jvm": "hotspot",
"architectures": ["amd64", "arm64", "armv7"]
},
{
"tag": "java11",
"java": "11",
"distribution": "ubuntu",
"jvm": "hotspot",
"architectures": ["amd64", "arm64", "armv7"],
"lts": true
},
{
"tag": "java8",
"java": "8",
"distribution": "ubuntu",
"jvm": "hotspot",
"architectures": ["amd64", "arm64", "armv7"],
"lts": true
},
{"tag": "adopt13", "deprecated": true},
{"tag": "adopt14", "deprecated": true},
{"tag": "adopt15", "deprecated": true},
{"tag": "openj9-nightly", "deprecated": true},
{"tag": "multiarch-latest", "deprecated": true},
{"tag": "java16-openj9", "deprecated": true},
{"tag": "java17-graalvm-ce", "deprecated": true},
{"tag": "java17-openj9", "deprecated": true},
{"tag": "java19", "deprecated": true},
{"tag": "java20-graalvm", "deprecated": true},
{"tag": "java20", "deprecated": true},
{"tag": "java20-alpine", "deprecated": true},
{"tag": "java23", "deprecated": true},
{"tag": "java8-multiarch", "deprecated": true},
{"tag": "java8-alpine", "deprecated": true},
{"tag": "java8-jdk", "deprecated": true},
{"tag": "java8-openj9", "deprecated": true},
{"tag": "java8-graalvm-ce", "deprecated": true}
]

View File

@@ -1,9 +1,9 @@
#!/bin/bash
. /auto/autopause-fcns.sh
. "$(dirname "$0")/autopause-fcns.sh"
# shellcheck source=../../scripts/start-utils
. "${SCRIPTS:-/}start-utils"
# shellcheck source=../start-utils
. "$(dirname "$0")/../start-utils"
if isTrue "${DEBUG_AUTOPAUSE}"; then
set -x
fi
@@ -84,7 +84,7 @@ do
else
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
logAutopause "No client connected since startup / knocked - pausing"
/auto/pause.sh
"$(dirname "$0")/pause.sh"
STATE=S
fi
fi
@@ -109,7 +109,7 @@ do
else
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
logAutopause "No client reconnected - pausing"
/auto/pause.sh
"$(dirname "$0")/pause.sh"
STATE=S
fi
fi
@@ -117,7 +117,7 @@ do
XS)
# Stopped
if rcon_client_exists ; then
/auto/resume.sh
"$(dirname "$0")/resume.sh"
fi
if java_running ; then
if java_clients_connected ; then

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# shellcheck source=../scripts/start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/../start-utils"
current_uptime() {
awk '{print $1}' /proc/uptime | cut -d . -f 1
}

View File

@@ -1,10 +1,10 @@
#!/bin/bash
# needed for the clients connected function residing in autopause
. /auto/autopause-fcns.sh
. "$(dirname "$0")/autopause-fcns.sh"
# shellcheck source=../../scripts/start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/../start-utils"
if isTrue "${DEBUG_AUTOSTOP}"; then
set -x
fi
@@ -49,7 +49,7 @@ do
else
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
logAutostop "No client connected since startup - stopping server"
/auto/stop.sh
"$(dirname "$0")"/stop.sh
exit 0
fi
fi
@@ -74,7 +74,7 @@ do
else
if [[ $(current_uptime) -ge $TIME_THRESH ]] ; then
logAutostop "No client reconnected - stopping"
/auto/stop.sh
"$(dirname "$0")"/stop.sh
exit 0
fi
fi

View File

@@ -1,6 +1,6 @@
#!/bin/bash
. /start-utils
. "$(dirname "$0")/../start-utils"
if isTrue "${DEBUG_AUTOPAUSE}"; then
set -x
fi

View File

@@ -9,10 +9,10 @@
# needed for the clients connected function residing in autopause
# shellcheck source=../auto/autopause-fcns.sh
. /auto/autopause-fcns.sh
. /image/scripts/auto/autopause-fcns.sh
# shellcheck source=start-utils
. ${SCRIPTS:-/}start-utils
. /image/scripts/start-utils
run_command(){
rcon_cmd="$1"

View File

@@ -1,6 +1,6 @@
#!/bin/bash
. /start-utils
. "$(dirname "$0")/../start-utils"
if isTrue "${DEBUG_AUTOPAUSE}"; then
set -x
fi

View File

@@ -1,6 +1,6 @@
#!/bin/bash
. /start-utils
. "$(dirname "$0")/../start-utils"
if isTrue "${DEBUG_AUTOSTOP}"; then
set -x
fi

3
bin/mc-health → scripts/shims/mc-health Executable file → Normal file
View File

@@ -1,7 +1,6 @@
#!/bin/bash
# shellcheck source=../scripts/start-utils
. "${SCRIPTS:-/}start-utils"
. "/image/scripts/start-utils"
if [ -f /data/.mc-health.env ]; then
. /data/.mc-health.env
fi

View File

@@ -1,5 +1,5 @@
#!/bin/bash
. "/start-utils"
. "/image/scripts/start-utils"
: "${CONSOLE_IN_NAMED_PIPE:=/tmp/minecraft-console-in}"
if isFalse "${CREATE_CONSOLE_IN_PIPE:-false}"; then

0
bin/mcstatus → scripts/shims/mcstatus Executable file → Normal file
View File

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
# The Dockerfile ENVs take precedence here, but defaulting for testing consistency
: "${UID:=1000}"
@@ -48,7 +48,7 @@ if ! isTrue "${SKIP_SUDO:-false}" && [ "$(id -u)" = 0 ]; then
echo 'hosts: files dns' > /etc/nsswitch.conf
fi
exec $(getSudoFromDistro) ${runAsUser}:${runAsGroup} "${SCRIPTS:-/}start-configuration" "$@"
exec $(getSudoFromDistro) ${runAsUser}:${runAsGroup} "$(dirname "$0")/start-configuration" "$@"
else
exec "${SCRIPTS:-/}start-configuration" "$@"
exec "$(dirname "$0")/start-configuration" "$@"
fi

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
: "${SERVER_PORT:=25565}"
: "${ENABLE_AUTOPAUSE:=false}"
@@ -24,7 +24,7 @@ log "Autopause functionality enabled"
isDebugging && set -x
cp /auto/knockd-config.cfg /tmp/knockd-config.cfg
cp /image/knockd-config.cfg /tmp/knockd-config.cfg
function updatePort() {
regseq="^\s*sequence\s*=\s*$1\s*$"
@@ -69,4 +69,4 @@ fi
let COOLDOWN=$AUTOPAUSE_TIMEOUT_KN/2
sed -i "s/\(seq_cooldown *= *\).*/\1$COOLDOWN/" /tmp/knockd-config.cfg
/auto/autopause-daemon.sh &
"$(dirname "$0")/auto/autopause-daemon.sh" &

View File

@@ -1,16 +1,14 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
: "${SERVER_PORT:=25565}"
: "${ENABLE_AUTOSTOP:=false}"
: "${AUTOSTOP_TIMEOUT_EST:=3600}"
: "${AUTOSTOP_TIMEOUT_INIT:=1800}"
: "${AUTOSTOP_PERIOD:=10}"
: "${DEBUG_AUTOSTOP:=false}"
export SERVER_PORT
export ENABLE_AUTOSTOP
export AUTOSTOP_TIMEOUT_EST
export AUTOSTOP_TIMEOUT_INIT
export AUTOSTOP_PERIOD
@@ -25,4 +23,4 @@ checkIfNotZeroElseSetToDefault "AUTOSTOP_PERIOD" 10
isNumericElseSetToDefault "AUTOSTOP_TIMEOUT_EST" 3600
isNumericElseSetToDefault "AUTOSTOP_TIMEOUT_INIT" 1800
/auto/autostop-daemon.sh &
"$(dirname "$0")/auto/autostop-daemon.sh" &

View File

@@ -3,7 +3,7 @@ set -euo pipefail
IFS=$'\n\t'
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
: "${EULA:=}"
: "${PROXY:=}"
@@ -50,7 +50,7 @@ fi
if isTrue "${DEBUG_MEMORY:-false}"; then
log "Memory usage and availability (in MB)"
uname -a
uname -pars
free -m
fi
@@ -101,21 +101,38 @@ if isTrue "${ENABLE_AUTOPAUSE}" && isTrue "${ENABLE_AUTOSTOP}"; then
exit 1
fi
proxyArgs=()
if [[ $PROXY ]]; then
export http_proxy="$PROXY"
export https_proxy="$PROXY"
export JAVA_TOOL_OPTIONS+="-Djava.net.useSystemProxies=true"
log "INFO: Giving proxy time to startup..."
sleep 5
IFS=":"
read -ra parts <<< "$PROXY"
IFS=" "
: "${PROXY_HOST=$(firstArrayElement parts)}"
shiftArray parts
: "${PROXY_PORT=$(firstArrayElement parts)}"
fi
# https://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html
proxyArgs=()
function addToProxyArgs() {
if [[ $2 ]]; then
proxyArgs+=("-D$1=$2")
fi
}
addToProxyArgs http.proxyHost "${PROXY_HOST:-}"
addToProxyArgs http.proxyPort "${PROXY_PORT:-}"
addToProxyArgs http.nonProxyHosts "${PROXY_NON_PROXY_HOSTS:-}"
export MC_IMAGE_HELPER_OPTS+=" ${proxyArgs[*]}"
function fixJavaPath() {
# Some Docker management UIs grab all the image declared variables and present them for configuration.
# When upgrading images across Java versions, that creates a mismatch in PATH's expected by base image.
# When upgrading images across Java versions, that creates parts mismatch in PATH's expected by base image.
if ! which java > /dev/null; then
logError " Your Docker provider has an annoying flaw where it"
logError " tries to set PATH even though the container establishes"
logError " a very specific value."
logError " parts very specific value."
sleep 2
# now find where java might be
for d in /opt/java/openjdk/bin /usr/bin; do
@@ -149,11 +166,9 @@ if isTrue "${VERSION_FROM_MODRINTH_PROJECTS:-}" && [[ ${MODRINTH_PROJECTS:-} ]];
fi
if isTrue "${ENABLE_AUTOPAUSE}"; then
"${SCRIPTS:-/}start-autopause"
fi
if isTrue "${ENABLE_AUTOSTOP}"; then
"${SCRIPTS:-/}start-autostop"
"$(dirname "$0")/start-autopause"
elif isTrue "${ENABLE_AUTOSTOP}"; then
"$(dirname "$0")/start-autostop"
fi
if
@@ -165,7 +180,7 @@ if
then
log "Starting RCON commands"
# shellcheck source=start-rconcmds
"${SCRIPTS:-/}start-rconcmds"
"$(dirname "$0")/start-rconcmds"
fi
: "${MODPACK_PLATFORM:=${MOD_PLATFORM:-}}"
@@ -183,19 +198,19 @@ esac
if [[ $MODPACK_PLATFORM ]]; then
case "${MODPACK_PLATFORM^^}" in
FTB|CURSEFORGE)
exec "${SCRIPTS:-/}start-deployCF" "$@"
exec "$(dirname "$0")/start-deployCF" "$@"
;;
FTBA)
exec "${SCRIPTS:-/}start-deployFTBA" "$@"
exec "$(dirname "$0")/start-deployFTBA" "$@"
;;
AUTO_CURSEFORGE)
exec "${SCRIPTS:-/}start-deployAutoCF" "$@"
exec "$(dirname "$0")/start-deployAutoCF" "$@"
;;
MODRINTH)
exec "${SCRIPTS:-/}start-deployModrinth" "$@"
exec "$(dirname "$0")/start-deployModrinth" "$@"
;;
*)
@@ -208,99 +223,99 @@ fi
log "Resolving type given ${TYPE}"
case "${TYPE^^}" in
*BUKKIT|SPIGOT)
exec "${SCRIPTS:-/}start-deployBukkitSpigot" "$@"
exec "$(dirname "$0")/start-deployBukkitSpigot" "$@"
;;
PAPER)
exec "${SCRIPTS:-/}start-deployPaper" "$@"
exec "$(dirname "$0")/start-deployPaper" "$@"
;;
FOLIA)
exec "${SCRIPTS:-/}start-deployFolia" "$@"
exec "$(dirname "$0")/start-deployFolia" "$@"
;;
FORGE)
exec "${SCRIPTS:-/}start-deployForge" "$@"
exec "$(dirname "$0")/start-deployForge" "$@"
;;
NEOFORGE|NEOFORGED)
exec "${SCRIPTS:-/}start-deployNeoForge" "$@"
exec "$(dirname "$0")/start-deployNeoForge" "$@"
;;
FABRIC)
exec "${SCRIPTS:-/}start-deployFabric" "$@"
exec "$(dirname "$0")/start-deployFabric" "$@"
;;
QUILT)
exec "${SCRIPTS:-/}start-deployQuilt" "$@"
exec "$(dirname "$0")/start-deployQuilt" "$@"
;;
VANILLA)
exec "${SCRIPTS:-/}start-deployVanilla" "$@"
exec "$(dirname "$0")/start-deployVanilla" "$@"
;;
SPONGEVANILLA)
exec "${SCRIPTS:-/}start-deploySpongeVanilla" "$@"
exec "$(dirname "$0")/start-deploySpongeVanilla" "$@"
;;
CUSTOM)
exec "${SCRIPTS:-/}start-deployCustom" "$@"
exec "$(dirname "$0")/start-deployCustom" "$@"
;;
MAGMA)
exec "${SCRIPTS:-/}start-deployMagma" "$@"
exec "$(dirname "$0")/start-deployMagma" "$@"
;;
MAGMA_MAINTAINED)
exec "${SCRIPTS:-/}start-deployMagmaMaintained" "$@"
exec "$(dirname "$0")/start-deployMagmaMaintained" "$@"
;;
KETTING)
exec "${SCRIPTS:-/}start-deployKetting" "$@"
exec "$(dirname "$0")/start-deployKetting" "$@"
;;
MOHIST|YOUER|BANNER)
exec "${SCRIPTS:-/}start-deployMohist" "$@"
exec "$(dirname "$0")/start-deployMohist" "$@"
;;
CATSERVER)
exec "${SCRIPTS:-/}start-deployCatserver" "$@"
exec "$(dirname "$0")/start-deployCatserver" "$@"
;;
PURPUR)
exec "${SCRIPTS:-/}start-deployPurpur" "$@"
exec "$(dirname "$0")/start-deployPurpur" "$@"
;;
PUFFERFISH)
exec "${SCRIPTS:-/}start-deployPufferfish" "$@"
exec "$(dirname "$0")/start-deployPufferfish" "$@"
;;
CANYON)
exec "${SCRIPTS:-/}start-deployCanyon" "$@"
exec "$(dirname "$0")/start-deployCanyon" "$@"
;;
LIMBO)
exec "${SCRIPTS:-/}start-deployLimbo" "$@"
exec "$(dirname "$0")/start-deployLimbo" "$@"
;;
NANOLIMBO)
exec "${SCRIPTS:-/}start-deployNanoLimbo" "$@"
exec "$(dirname "$0")/start-deployNanoLimbo" "$@"
;;
CRUCIBLE)
exec "${SCRIPTS:-/}start-deployCrucible" "$@"
exec "$(dirname "$0")/start-deployCrucible" "$@"
;;
LEAF)
exec "${SCRIPTS:-/}start-deployLeaf" "$@"
exec "$(dirname "$0")/start-deployLeaf" "$@"
;;
ARCLIGHT)
exec "${SCRIPTS:-/}start-deployArcLight" "$@"
exec "$(dirname "$0")/start-deployArcLight" "$@"
;;
POSEIDON)
exec "${SCRIPTS:-/}start-deployPoseidon" "$@"
exec "$(dirname "$0")/start-deployPoseidon" "$@"
;;
*)

View File

@@ -38,4 +38,4 @@ export SERVER
export FAMILY=HYBRID
export HYBRIDTYPE="${ARCLIGHT_TYPE,,}"
exec "${SCRIPTS:-/}start-spiget" "$@"
exec "$(dirname "$0")/start-spiget" "$@"

View File

@@ -2,7 +2,7 @@
set -eu
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
: "${CF_PAGE_URL:=}"
: "${CF_SLUG:=}"
@@ -75,4 +75,4 @@ fi
applyResultsFile ${resultsFile}
resolveFamily
exec "${SCRIPTS:-/}start-setupWorld" "$@"
exec "$(dirname "$0")/start-setupWorld" "$@"

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
isDebugging && set -x
set -eo pipefail
@@ -123,4 +123,4 @@ export JVM_OPTS
# Normalize on Spigot for operations below
export FAMILY=SPIGOT
exec "${SCRIPTS:-/}start-spiget" "$@"
exec "$(dirname "$0")/start-spiget" "$@"

View File

@@ -3,7 +3,7 @@
set -e
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
loadForgeVars() {
cfgFile=${1?}
@@ -138,7 +138,7 @@ if ! isTrue "${USE_MODPACK_START_SCRIPT:-true}"; then
FTB_DIR=$(dirname "${SERVER}")
export FTB_DIR
exec "${SCRIPTS:-/}start-setupWorld" "$@"
exec "$(dirname "$0")/start-setupWorld" "$@"
fi
@@ -250,4 +250,4 @@ if isTrue "${FTB_LEGACYJAVAFIXER}" && [ ! -e "${legacyJavaFixerPath}" ]; then
fi
export FAMILY=FORGE
exec "${SCRIPTS:-/}start-setupWorld" "$@"
exec "$(dirname "$0")/start-setupWorld" "$@"

View File

@@ -3,7 +3,7 @@ set -euo pipefail
IFS=$'\n\t'
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
isDebugging && set -x
: "${CANYON_BUILD:=lastSuccessfulBuild}"
@@ -58,4 +58,4 @@ fi
# Normalize on Spigot for later operations
export FAMILY=SPIGOT
exec ${SCRIPTS:-/}start-spiget "$@"
exec "$(dirname "$0")/start-spiget" "$@"

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
set -o pipefail
set -e
@@ -30,4 +30,4 @@ fi
export FAMILY=HYBRID
export HYBRIDTYPE=forge
exec "${SCRIPTS:-/}start-spiget" "$@"
exec "$(dirname "$0")/start-spiget" "$@"

View File

@@ -58,4 +58,4 @@ export SERVER
export FAMILY=HYBRID
export HYBRIDTYPE=forge
exec "${SCRIPTS:-/}start-spiget" "$@"
exec "$(dirname "$0")/start-spiget" "$@"

View File

@@ -5,7 +5,7 @@
: "${CUSTOM_JAR_EXEC:=}"
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
isDebugging && set -x
if isURL "${CUSTOM_SERVER}"; then
@@ -42,4 +42,4 @@ fi
export FAMILY="${FAMILY:-HYBRID}"
export HYBRIDTYPE="${HYBRIDTYPE:-any}"
exec "${SCRIPTS:-/}start-spiget" "$@"
exec "$(dirname "$0")/start-spiget" "$@"

View File

@@ -7,7 +7,7 @@
ftbInstallMarker=".ftb-installed"
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
isDebugging && set -x
set -e
@@ -36,6 +36,12 @@ function getModLoaderVersion() {
function getMinecraftVersion() {
jq -r ".modPackTargets.mcVersion" ${ftbManifest}
}
function getModpackName() {
jq -r ".name" ${ftbManifest}
}
function getModpackVersion() {
jq -r ".versionName" ${ftbManifest}
}
if [[ $(getDistro) = alpine ]]; then
logError "The FTBA installer is not supported on Alpine. Use the java8-multiarch image tag instead."
@@ -102,7 +108,9 @@ modLoader="$(getModLoaderName)"
modLoaderVersion="$(getModLoaderVersion)"
mcVersion=$(getMinecraftVersion)
VERSION="$mcVersion"
export VERSION
MODPACK_NAME=$(getModpackName)
MODPACK_VERSION=$(getModpackVersion)
export VERSION MODPACK_NAME MODPACK_VERSION
variants=(
run.sh
@@ -152,4 +160,4 @@ else
exit 1
fi
exec "${SCRIPTS:-/}start-setupWorld" "$@"
exec "$(dirname "$0")/start-setupWorld" "$@"

View File

@@ -2,7 +2,7 @@
set -eu
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
export TYPE=FABRIC
: "${FABRIC_LAUNCHER_VERSION:=${FABRIC_INSTALLER_VERSION:-LATEST}}"
@@ -56,4 +56,4 @@ fi
applyResultsFile ${resultsFile}
export FAMILY=FABRIC
exec "${SCRIPTS:-/}start-setupWorld" "$@"
exec "$(dirname "$0")/start-setupWorld" "$@"

View File

@@ -3,7 +3,7 @@
: "${FOLIA_CHANNEL:=experimental}"
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
set -o pipefail
handleDebugMode
@@ -18,4 +18,4 @@ fi
PAPER_PROJECT="folia" \
PAPER_NAME="FoliaMC" \
PAPER_CHANNEL="${FOLIA_CHANNEL}" \
exec "${SCRIPTS:-/}start-deployPaper" "$@"
exec "$(dirname "$0")/start-deployPaper" "$@"

View File

@@ -46,4 +46,4 @@ applyResultsFile ${resultsFile}
export FAMILY=FORGE
exec "${SCRIPTS:-/}start-setupWorld" "$@"
exec "$(dirname "$0")/start-setupWorld" "$@"

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
isDebugging && set -x
if ! SERVER=$(mc-image-helper github download-latest-asset \
@@ -30,4 +30,4 @@ export SERVER
export FAMILY=HYBRID
export HYBRIDTYPE=forge
exec "${SCRIPTS:-/}start-spiget" "$@"
exec "$(dirname "$0")/start-spiget" "$@"

View File

@@ -48,4 +48,4 @@ fi
export FAMILY=SPIGOT
export SERVER
exec "${SCRIPTS:-/}start-spiget" "$@"
exec "$(dirname "$0")/start-spiget" "$@"

View File

@@ -2,15 +2,15 @@
set -euo pipefail
IFS=$'\n\t'
. ${SCRIPTS:-/}start-utils
. "$(dirname "$0")/start-utils"
isDebugging && set -x
: ${LIMBO_BUILD:=LATEST}
: ${FORCE_REDOWNLOAD:=false}
: ${LIMBO_SCHEMA_FILENAME:=default.schem}
: ${LEVEL:=default;${LIMBO_SCHEMA_FILENAME}}
: "${LIMBO_BUILD:=LATEST}"
: "${FORCE_REDOWNLOAD:=false}"
: "${LIMBO_SCHEMA_FILENAME:=default.schem}"
: "${LEVEL:=default;${LIMBO_SCHEMA_FILENAME}}"
# defaults to localhost, if this is not set
: ${SERVER_IP:=0.0.0.0}
: "${SERVER_IP:=0.0.0.0}"
export LEVEL SERVER_IP
@@ -65,4 +65,4 @@ fi
export LEVEL
export FAMILY=LIMBO
exec ${SCRIPTS:-/}start-setupWorld "$@"
exec "$(dirname "$0")/start-setupWorld" "$@"

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
isDebugging && set -x
: "${MAGMA_VERSION:=}"
@@ -27,4 +27,4 @@ export SERVER
export FAMILY=HYBRID
export HYBRIDTYPE=forge
exec "${SCRIPTS:-/}start-spiget" "$@"
exec "$(dirname "$0")/start-spiget" "$@"

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
isDebugging && set -x
: "${FORGE_VERSION:=}"
@@ -36,4 +36,4 @@ export SERVER
export FAMILY=HYBRID
export HYBRIDTYPE=forge
exec "${SCRIPTS:-/}start-spiget" "$@"
exec "$(dirname "$0")/start-spiget" "$@"

View File

@@ -2,7 +2,7 @@
set -eu
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
resultsFile=/data/.install-modrinth.env
@@ -14,6 +14,7 @@ resultsFile=/data/.install-modrinth.env
: "${MODRINTH_FORCE_INCLUDE_FILES=}"
: "${MODRINTH_OVERRIDES_EXCLUSIONS=}"
: "${MODRINTH_DEFAULT_EXCLUDE_INCLUDES=/image/modrinth-exclude-include.json}"
: "${MODRINTH_FORCE_MODLOADER_REINSTALL:=${FORCE_MODLOADER_REINSTALL:-false}}"
if [[ ! $MODRINTH_MODPACK ]]; then
logError "MODRINTH_MODPACK must be set when using TYPE/MODPACK_PLATFORM/MOD_PLATFORM of MODRINTH"
@@ -33,6 +34,9 @@ args=(
if [[ $MODRINTH_IGNORE_MISSING_FILES ]]; then
args+=(--ignore-missing-files "$MODRINTH_IGNORE_MISSING_FILES")
fi
if isTrue "${MODRINTH_FORCE_MODLOADER_REINSTALL}"; then
args+=(--force-modloader-reinstall)
fi
case "${VERSION^^}" in
LATEST)
@@ -71,4 +75,4 @@ fi
applyResultsFile ${resultsFile}
resolveFamily
exec "${SCRIPTS:-/}start-setupWorld" "$@"
exec "$(dirname "$0")/start-setupWorld" "$@"

View File

@@ -14,38 +14,39 @@ mohistType="${TYPE,,}"
mohistApiUrl="https://api.mohistmc.com/project/${mohistType}"
mohistDownloadsPage="https://mohistmc.com/downloadSoftware?project=${mohistType}"
if ! get --exists "${mohistApiUrl}/${VERSION}/builds"; then
logError "${mohistType} builds do not exist for ${VERSION}"
logError " check ${mohistDownloadsPage} for available versions"
logError " and set VERSION accordingly"
exit 1
fi
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}"
if [[ "${MOHIST_BUILD}" != "lastSuccessfulBuild" ]] && [[ "${VERSION,,}" != latest ]] && [[ -f "/data/${mohistType}-${VERSION}-${MOHIST_BUILD}-server.jar" ]]; then
log "Skipping Mohist build lookup since server jar exists"
SERVER="/data/${mohistType}-${VERSION}-${MOHIST_BUILD}-server.jar"
else
if ! get --exists "${mohistApiUrl}/${VERSION}/builds"; then
logError "${mohistType} builds do not exist for ${VERSION}"
logError " check ${mohistDownloadsPage} for available versions"
logError " and set VERSION accordingly"
exit 1
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
logError "Could not find build ${MOHIST_BUILD} for version ${VERSION}"
logError " check ${mohistDownloadsPage} for available versions"
logError " and set VERSION accordingly"
exit 1
fi
downloadUrl="${mohistApiUrl}/${VERSION}/builds/${MOHIST_BUILD}/download"
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
log "Downloading ${mohistType^} build ${MOHIST_BUILD} for ${VERSION}"
get -o "${SERVER}" "${downloadUrl}"
SERVER="/data/${mohistType}-${VERSION}-${MOHIST_BUILD}-server.jar"
get --skip-existing -o "${SERVER}" "${downloadUrl}"
fi
if [[ "${mohistType}" == "mohist" ]]; then
@@ -61,4 +62,4 @@ fi
export SERVER
export FAMILY=HYBRID
exec "${SCRIPTS:-/}start-spiget" "$@"
exec "$(dirname "$0")/start-spiget" "$@"

View File

@@ -1,19 +1,164 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
isDebugging && set -x
if ! SERVER=$(mc-image-helper github download-latest-asset \
--output-directory=/data \
--name-pattern="NanoLimbo-.+?(?<!-sources)\.jar" \
--name-pattern="NanoLimbo(-.+?(?<!-sources))?\.jar" \
BoomEaro/NanoLimbo
); then
logError "Failed to download NanoLimbo"
exit 1
fi
: "${SERVER_PORT:=25565}"
cat <<EOF > /data/settings.yml
#
# NanoLimbo configuration
#
# Server's host address and port. Set ip empty to use public address
bind:
ip: '0.0.0.0'
port: ${SERVER_PORT}
# Max number of players can join to server
# Set -1 to make it infinite
maxPlayers: 100
# Server's data in servers list
ping:
description: '{"text": "&9NanoLimbo"}'
version: 'NanoLimbo'
# Return static protocol version number in ping result
# By default, its -1 to return the client version if it supported
# https://wiki.vg/Protocol_version_numbers
protocol: -1
# Available dimensions: OVERWORLD, NETHER, THE_END
dimension: THE_END
# Whether to display the player in the player list
# For 1.16.5 clients, the player list will be sent even if disabled, to avoid crash
playerList:
enable: false
username: 'NanoLimbo'
# Whether to display header and footer in player list
# For 1.8+ clients
headerAndFooter:
enable: false
header: '{"text": "&eWelcome!"}'
footer: '{"text": "&9NanoLimbo"}'
# Setup player's game mode
# 0 - Survival
# 1 - Creative (hide HP and food bar)
# 2 - Adventure
# 3 - Spectator (hide all UI bars)
# Spectator works on 1.8+ clients
gameMode: 3
# Remove secure-chat toast
# For 1.20.5+ clients
secureProfile: false
# Server name which is shown under F3
# For 1.13+ clients
brandName:
enable: true
content: 'NanoLimbo'
# Message sends when player joins to the server
joinMessage:
enable: true
text: '{"text": "&eWelcome to the Limbo!"}'
# BossBar displays when player joins to the server
# For 1.9+ clients
bossBar:
enable: true
text: '{"text": "Welcome to the Limbo!"}'
health: 1.0
# Available colors: PINK, BLUE, RED, GREEN, YELLOW, PURPLE, WHITE
color: PINK
# Available divisions: SOLID, DASHES_6, DASHES_10, DASHES_12, DASHES_20
division: SOLID
# Display title and subtitle
# For 1.8+ clients
title:
enable: true
# Set title text value empty, if you need only subtitle
title: '{"text": "&9&lWelcome!"}'
# Set subtitle text value empty, if you need only title
subtitle: '{"text": "&6NanoLimbo"}'
# Fade in time in ticks (1 sec = 20 ticks)
fadeIn: 10
# Stay time in ticks
stay: 100
# Fade out time in ticks
fadeOut: 10
# Player info forwarding support.
# Available types:
# - NONE
# - LEGACY
# - MODERN
# - BUNGEE_GUARD
# Don't use secret if you do not use MODERN type
infoForwarding:
type: NONE
secret: '<YOUR_SECRET_HERE>'
tokens:
- '<BUNGEE_GUARD_TOKEN>'
# Read timeout for connections in milliseconds
readTimeout: 30000
# Define log level. For production, I'd recommend to use level 2
# Log levels:
# 0 - Display only errors
# 1 - Display errors, warnings
# 2 - Display errors, warnings, info
# 3 - Display errors, warnings, info, debug
debugLevel: 2
# Warning! Do not touch params of this block if you are not completely sure what is this!
netty:
# Use a Linux native transport type, if it possible
useEpoll: true
# EventLoopGroup threads count
threads:
bossGroup: 1
workerGroup: 4
# Options to check incoming traffic and kick potentially malicious connections.
# Take into account that player can send many small packets, for example, just moving mouse.
traffic:
# If true, then additional handler will be added to the channel pipeline
enable: true
# Max packet size in bytes
# Unlimited if -1
maxPacketSize: 8192
# The interval to measure packets over
# Lowering this value will limit peak packets from players which would target people with bad connections
# Raising this value will allow higher peak packet rates, which will help with people who have poor connections
# Ignored if -1.0
interval: 7.0
# The maximum packets per second for players
# It is measured over the configured interval
# Ignored if -1.0
maxPacketRate: 500.0
# The maximum packet bytes per second for players
# It is measured over the configured interval as an average bytes/sec
# Ignored if -1.0
maxPacketBytesRate: 2048.0
EOF
export SERVER
export FAMILY=LIMBO
exec ${SCRIPTS:-/}start-setupMounts "$@"
exec "$(dirname "$0")/start-setupMounts" "$@"

View File

@@ -23,4 +23,4 @@ applyResultsFile ${resultsFile}
export FAMILY=FORGE
exec "${SCRIPTS:-/}start-setupWorld" "$@"
exec "$(dirname "$0")/start-setupWorld" "$@"

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
set -o pipefail
handleDebugMode
@@ -58,4 +58,4 @@ export DOWNLOAD_DEFAULTS
# Normalize on Spigot for downstream operations
export FAMILY=SPIGOT
exec "${SCRIPTS:-/}start-spiget" "$@"
exec "$(dirname "$0")/start-spiget" "$@"

View File

@@ -34,4 +34,4 @@ fi
export SERVER
export FAMILY=SPIGOT
exec "${SCRIPTS:-/}start-spiget" "$@"
exec "$(dirname "$0")/start-spiget" "$@"

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
set -euo pipefail
isDebugging && set -x
@@ -45,4 +45,4 @@ fi
# Normalize on Spigot for later operations
export FAMILY=SPIGOT
exec "${SCRIPTS:-/}start-spiget" "$@"
exec "$(dirname "$0")/start-spiget" "$@"

View File

@@ -6,7 +6,7 @@ IFS=$'\n\t'
: "${PURPUR_DOWNLOAD_URL:=}"
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
isDebugging && set -x
resultsFile=/data/.purpur.env
@@ -39,4 +39,4 @@ applyResultsFile ${resultsFile}
# Normalize on Spigot for later operations
export FAMILY=SPIGOT
exec "${SCRIPTS:-/}start-spiget" "$@"
exec "$(dirname "$0")/start-spiget" "$@"

View File

@@ -2,7 +2,7 @@
set -eu
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
: "${QUILT_LAUNCHER:=}"
: "${QUILT_LAUNCHER_URL:=}"
@@ -29,7 +29,7 @@ if [[ $QUILT_LAUNCHER ]]; then
resolveVersion
export FAMILY=FABRIC
exec "${SCRIPTS:-/}start-setupWorld" "$@"
exec "$(dirname "$0")/start-setupWorld" "$@"
elif [[ $QUILT_LAUNCHER_URL ]]; then
logError "QUILT_LAUNCHER_URL is not longer supported. Pre-download and use QUILT_LAUNCHER."
@@ -52,4 +52,4 @@ fi
applyResultsFile ${resultsFile}
export FAMILY=FABRIC
exec "${SCRIPTS:-/}start-setupWorld" "$@"
exec "$(dirname "$0")/start-setupWorld" "$@"

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# shellcheck source=start-utils
. ${SCRIPTS:-/}start-utils
. "$(dirname "$0")/start-utils"
export TYPE=spongevanilla
: ${SPONGEBRANCH:=STABLE}
@@ -37,4 +37,4 @@ if [ ! -e "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then
fi
export FAMILY=SPONGE
exec "${SCRIPTS:-/}start-setupWorld" "$@"
exec "$(dirname "$0")/start-setupWorld" "$@"

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
isDebugging && set -x
set -o pipefail
@@ -53,4 +53,4 @@ fi
isDebugging && ls -l
export FAMILY=VANILLA
exec "${SCRIPTS:-/}start-setupWorld" "$@"
exec "$(dirname "$0")/start-setupWorld" "$@"

View File

@@ -5,7 +5,7 @@
: "${CUSTOM_JAR_EXEC:=}"
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
isDebugging && set -x
baseDataDir=/data
tmpServerIconPath=/tmp/icon.img
@@ -151,19 +151,22 @@ if isTrue "${ENABLE_JMX}"; then
log "JMX is enabled. Make sure you have port forwarding for ${JMX_PORT}"
fi
: "${USE_AIKAR_FLAGS:=false}"
: "${USE_MEOWICE_FLAGS:=false}"
: "${USE_MEOWICE_GRAALVM_FLAGS:=false}"
if isTrue "${USE_MEOWICE_FLAGS}"; then
java_major_version=$(mc-image-helper java-release)
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+"
else
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_AIKAR_FLAGS=TRUE
fi
USE_AIKAR_FLAGS=TRUE
fi
if isTrue "${USE_AIKAR_FLAGS}"; then
if isTrue "${USE_AIKAR_FLAGS}" || isTrue "${USE_MEOWICE_FLAGS}"; then
# From https://mcflags.emc.gs/
if isTrue "${USE_MEOWICE_FLAGS}"; then
log "Using MeowIce's flags"
@@ -213,14 +216,19 @@ if isTrue "${USE_AIKAR_FLAGS}"; then
-XX:SurvivorRatio=32
-XX:+PerfDisableSharedMem
-XX:MaxTenuringThreshold=1
-Dusing.aikars.flags=https://mcflags.emc.gs
-Daikars.new.flags=true
"
if isTrue "${USE_AIKAR_FLAGS}"; then
JVM_XX_OPTS="${JVM_XX_OPTS}
-Dusing.aikars.flags=https://mcflags.emc.gs
-Daikars.new.flags=true
"
fi
fi
if isTrue "${USE_MEOWICE_FLAGS}"; then
JVM_XX_OPTS="${JVM_XX_OPTS}
-XX:+UnlockDiagnosticVMOptions
-XX:+UnlockExperimentalVMOptions
-XX:G1SATBBufferEnqueueingThresholdPercent=30
-XX:G1ConcMarkStepDurationMillis=5
-XX:+UseNUMA

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# shellcheck source=start-utils
. "${SCRIPTS:-/}start-utils"
. "$(dirname "$0")/start-utils"
: "${RCON_CMDS_STARTUP:=}"
: "${RCON_CMDS_ON_CONNECT:=}"
@@ -25,4 +25,4 @@ isDebugging && set -x
isNumericElseSetToDefault RCON_CMDS_PERIOD 10
checkIfNotZeroElseSetToDefault RCON_CMDS_PERIOD 10
/usr/local/bin/rcon-cmds-daemon.sh &
"$(dirname "$0")/auto/rcon-cmds-daemon.sh" &

Some files were not shown because too many files have changed in this diff Show More