Compare commits

..

1 Commits

Author SHA1 Message Date
Geoff Bourne
288dc1f0b3 docs: avoid overly describing server properties 2025-06-23 20:14:50 -05:00
122 changed files with 1127 additions and 1666 deletions

2
.gitattributes vendored
View File

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

View File

@@ -12,7 +12,6 @@ on:
- "examples/**" - "examples/**"
- "notes/**" - "notes/**"
- "kustomize/**" - "kustomize/**"
- "images.json"
jobs: jobs:
build: build:
@@ -21,8 +20,8 @@ jobs:
matrix: matrix:
# NOTE: the "latest" variant is identified in the Docker meta step's 'latest' config # NOTE: the "latest" variant is identified in the Docker meta step's 'latest' config
variant: variant:
- java25 - java24
- java25-graalvm - java24-graalvm
- java21 - java21
- java21-alpine - java21-alpine
- java21-graalvm - java21-graalvm
@@ -30,20 +29,18 @@ jobs:
- java17 - java17
- java17-graalvm - java17-graalvm
- java17-alpine - java17-alpine
- java16
- java11
- java8 - java8
- java8-graalvm-ce - java8-graalvm-ce
- java8-openj9 - java8-openj9
- java8-jdk - java8-jdk
include: include:
# JAVA 25 # JAVA 24
- variant: java25 - variant: java24
baseImage: eclipse-temurin:25-jre baseImage: eclipse-temurin:24-jre
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
mcVersion: latest mcVersion: latest
- variant: java25-graalvm - variant: java24-graalvm
baseImage: container-registry.oracle.com/graalvm/jdk:25-ol8 baseImage: container-registry.oracle.com/graalvm/jdk:24-ol8
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
mcVersion: latest mcVersion: latest
# JAVA 21: # JAVA 21:
@@ -77,41 +74,31 @@ jobs:
baseImage: eclipse-temurin:17-jre-alpine baseImage: eclipse-temurin:17-jre-alpine
platforms: linux/amd64 platforms: linux/amd64
mcVersion: 1.20.4 mcVersion: 1.20.4
# JAVA 16
- variant: java16
baseImage: adoptopenjdk:16-jre-hotspot
platforms: linux/amd64,linux/arm/v7,linux/arm64
mcVersion: 1.16.5
# JAVA 11
- variant: java11
baseImage: adoptopenjdk:11-jre-hotspot
platforms: linux/amd64,linux/arm/v7,linux/arm64
mcVersion: 1.16.4
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies # JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
- variant: java8 - variant: java8
baseImage: eclipse-temurin:8u312-b07-jre-focal baseImage: eclipse-temurin:8u312-b07-jre-focal
platforms: linux/amd64,linux/arm/v7,linux/arm64 platforms: linux/amd64,linux/arm/v7,linux/arm64
mcVersion: 1.12.2 mcVersion: 1.12.2
# Pin version for Java 8 # Pin version for Java 8
# mcHelperVersion: 1.46.0 mcHelperVersion: 1.42.1
- variant: java8-graalvm-ce - variant: java8-graalvm-ce
baseImage: ghcr.io/graalvm/graalvm-ce:java8 baseImage: ghcr.io/graalvm/graalvm-ce:java8
platforms: linux/amd64 platforms: linux/amd64
mcVersion: 1.12.2 mcVersion: 1.12.2
# Pin version for Java 8 # Pin version for Java 8
# mcHelperVersion: 1.46.0 mcHelperVersion: 1.42.1
- variant: java8-jdk - variant: java8-jdk
baseImage: eclipse-temurin:8u312-b07-jdk-focal baseImage: eclipse-temurin:8u312-b07-jdk-focal
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
mcVersion: 1.12.2 mcVersion: 1.12.2
# Pin version for Java 8 # Pin version for Java 8
# mcHelperVersion: 1.46.0 mcHelperVersion: 1.42.1
- variant: java8-openj9 - variant: java8-openj9
baseImage: ibm-semeru-runtimes:open-8u312-b07-jre baseImage: ibm-semeru-runtimes:open-8u312-b07-jre
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
mcVersion: 1.12.2 mcVersion: 1.12.2
# Pin version for Java 8 # Pin version for Java 8
# mcHelperVersion: 1.46.0 mcHelperVersion: 1.42.1
env: env:
IMAGE_TO_TEST: "${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}" IMAGE_TO_TEST: "${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}"
HAS_IMAGE_REPO_ACCESS: ${{ secrets.DOCKER_USER != '' && secrets.DOCKER_PASSWORD != '' }} HAS_IMAGE_REPO_ACCESS: ${{ secrets.DOCKER_USER != '' && secrets.DOCKER_PASSWORD != '' }}
@@ -119,14 +106,14 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v5.0.0 uses: actions/checkout@v4.2.2
with: with:
# for build-files step # for build-files step
fetch-depth: 0 fetch-depth: 0
- name: Docker meta - name: Docker meta
id: meta id: meta
uses: docker/metadata-action@v5.8.0 uses: docker/metadata-action@v5.7.0
with: with:
# NOTE for forks: if your Docker Hub organization doesn't match your Github repo's, # 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. # then the use of ${{ github.repository_owner }} will need to be replaced.
@@ -186,14 +173,14 @@ jobs:
tests/test.sh tests/test.sh
- name: Login to DockerHub - name: Login to DockerHub
uses: docker/login-action@v3.6.0 uses: docker/login-action@v3.4.0
if: env.HAS_IMAGE_REPO_ACCESS if: env.HAS_IMAGE_REPO_ACCESS
with: with:
username: ${{ secrets.DOCKER_USER }} username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GHCR - name: Login to GHCR
uses: docker/login-action@v3.6.0 uses: docker/login-action@v3.4.0
if: env.HAS_IMAGE_REPO_ACCESS if: env.HAS_IMAGE_REPO_ACCESS
with: with:
registry: ghcr.io registry: ghcr.io

View File

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

View File

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

View File

@@ -43,19 +43,18 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \ --var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz --from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_SERVER_RUNNER_VERSION=1.13.4 ARG MC_SERVER_RUNNER_VERSION=1.13.1
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \ --var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz --from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_HELPER_VERSION=1.49.2 ARG MC_HELPER_VERSION=1.45.0
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION} ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
# used for cache busting local copy of mc-image-helper # used for cache busting local copy of mc-image-helper
ARG MC_HELPER_REV=1 ARG MC_HELPER_REV=1
RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \ RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
| tar -C /usr/share -zxf - \ | 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-${MC_HELPER_VERSION}/bin/mc-image-helper /usr/bin
&& ln -s /usr/share/mc-image-helper/bin/mc-image-helper /usr/bin
VOLUME ["/data"] VOLUME ["/data"]
WORKDIR /data WORKDIR /data
@@ -65,24 +64,17 @@ STOPSIGNAL SIGTERM
# End user MUST set EULA and change RCON_PASSWORD # 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 ENV TYPE=VANILLA VERSION=LATEST EULA="" UID=1000 GID=1000 LC_ALL=en_US.UTF-8
COPY --chmod=755 scripts/start* /image/scripts/ COPY --chmod=755 scripts/start* /
COPY --chmod=755 bin/ /usr/local/bin/
# Backward compatible shim for those with legacy entrypoint COPY --chmod=755 bin/mc-health /health.sh
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/ 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 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/* RUN dos2unix /start* /auto/*
ENTRYPOINT [ "/image/scripts/start" ] ENTRYPOINT [ "/start" ]
HEALTHCHECK --start-period=2m --retries=2 --interval=30s CMD mc-health HEALTHCHECK --start-period=2m --retries=2 --interval=30s CMD mc-health
ARG BUILDTIME=local ARG BUILDTIME=local

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

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

View File

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

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

View File

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

View File

@@ -1,4 +1,4 @@
FROM python:3.11 FROM python:3.9
RUN pip install --upgrade pip RUN pip install --upgrade pip

View File

@@ -50,17 +50,9 @@ In order to attach and interact with the Minecraft server make sure to enable TT
tty: true tty: true
``` ```
With that you can attach and interact at any time using the following, replacing the `{...}` placeholders. With that you can attach and interact at any time using
...when container is created with `docker run` docker attach mc
```
docker attach {container name or ID}
```
...or when declared using a compose file
```
docker compose attach {service name}
```
and then Control-p Control-q to **detach**. and then Control-p Control-q to **detach**.

View File

@@ -136,4 +136,8 @@ When `MEMORY` is greater than or equal to 12G, then the Aikar flags will be adju
[MeowIce has created an updated set of JVM flags](https://github.com/MeowIce/meowice-flags?tab=readme-ov-file#why-would-i-have-to-switch-) based on Aikar's flags but with support for optimizations for Java 17 and above [MeowIce has created an updated set of JVM flags](https://github.com/MeowIce/meowice-flags?tab=readme-ov-file#why-would-i-have-to-switch-) based on Aikar's flags but with support for optimizations for Java 17 and above
The set of flags documented there can be added 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`. 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`

View File

@@ -1,3 +1,4 @@
## Running with a custom server JAR ## 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 If you would like to run a custom server JAR, set `-e TYPE=CUSTOM` and pass the custom server
@@ -106,7 +107,11 @@ such as:
## HTTP Proxy ## 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`. 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 ## Using "noconsole" option
@@ -119,9 +124,7 @@ disable that by passing `-e GUI=FALSE`.
## Stop Duration ## 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. 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.
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 ## Setup only
@@ -143,37 +146,6 @@ To enable support for optimized SIMD operations, the JVM flag can be set with th
SIMD optimized operations are supported by Pufferfish and Purpur. 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 ## Enable timestamps in init logs
Before the container starts the Minecraft Server its output is prefixed with `[init]`, such as Before the container starts the Minecraft Server its output is prefixed with `[init]`, such as

View File

@@ -84,19 +84,9 @@ To produce a multi-line MOTD, embed a newline character as `\n` in the string, s
# MOTD: "line one\nline two" # MOTD: "line one\nline two"
``` ```
The following example combines a multi-line MOTD with [placeholders](#placeholders) from the latest version of the installed modpack: !!! tip
!!! example You can also embed configured and resolved environment variables using [placeholders](#placeholders).
```yaml
MOD_PLATFORM: AUTO_CURSEFORGE
CF_SLUG: craftoria
MOTD: |
A %TYPE% server on %VERSION%
running %MODPACK_NAME% %MODPACK_VERSION%
```
![](../img/motd-with-placeholders.png)
### Difficulty ### Difficulty
@@ -256,7 +246,7 @@ By default, the server listens for RCON on port 25575 within the container. It c
### Query ### Query
Set the environment variable `ENABLE_QUERY` to "true" to enable the gamespy query protocol. Maps to the server property [enable-query](https://minecraft.wiki/w/Server.properties#enable-query). By default, the query port will be `25565` (UDP) but can be changed with the `QUERY_PORT` environment variable. Set the environment variable `QUERY_PORT` to "true" to enable the gamespy query protocol. Map to the server property [enable-query](https://minecraft.wiki/w/Server.properties#enable-query). By default, the query port will be `25565` (UDP) but can be changed with the `QUERY_PORT` environment variable.
### Level Seed ### Level Seed
@@ -312,28 +302,29 @@ Example for a superflat world:
- Desert biome - Desert biome
```yaml ```yaml
environment: LEVEL_TYPE: FLAT
LEVEL_TYPE: FLAT GENERATOR_SETTINGS: >-4
GENERATOR_SETTINGS: >- {
{ "layers": [
"layers": [ {
{ "block": "minecraft:bedrock",
"block": "minecraft:bedrock", "height": 1
"height": 1 },
}, {
{ "block": "minecraft:stone",
"block": "minecraft:stone", "height": 2
"height": 2 },
}, {
{ "block": "minecraft:sandstone",
"block": "minecraft:sandstone", "height": 15
"height": 15 }
} ],
], "biome": "minecraft:desert"
"biome": "minecraft:desert" }
}
``` ```
For more details, refer to the Minecraft Wiki sections for [Superflat Multiplayer](https://minecraft.wiki/w/Superflat#Multiplayer) and [generator options tag format](https://minecraft.wiki/w/Java_Edition_level_format#generatorOptions_tag_format). For more details, check the [official wiki](https://minecraft.wiki/w/Java_Edition_level_format#generatorOptions_tag_format).
### Custom Server Resource Pack ### Custom Server Resource Pack
@@ -396,51 +387,41 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
### Other server property mappings ### Other server property mappings
| Environment Variable | Server Property | | 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_FLIGHT | [allow-flight](https://minecraft.wiki/w/Server.properties#allow-flight) | | ALLOW_NETHER | [allow-nether](https://minecraft.wiki/w/Server.properties#allow-nether) |
| ALLOW_NETHER | [allow-nether](https://minecraft.wiki/w/Server.properties#allow-nether) | | BROADCAST_CONSOLE_TO_OPS | broadcast-console-to-ops |
| 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 |
| BROADCAST_RCON_TO_OPS | [broadcast-rcon-to-ops](https://minecraft.wiki/w/Server.properties#broadcast-rcon-to-ops) | | BUG_REPORT_LINK | bug-report-link |
| 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_COMMAND_BLOCK | [enable-command-block](https://minecraft.wiki/w/Server.properties#enable-command-block) | | ENABLE_STATUS | enable-status |
| ENABLE_STATUS | [enable-status](https://minecraft.wiki/w/Server.properties#enable-status) | | ENFORCE_SECURE_PROFILE | enforce-secure-profile |
| ENFORCE_SECURE_PROFILE | [enforce-secure-profile](https://minecraft.wiki/w/Server.properties#enforce-secure-profile) | | ENTITY_BROADCAST_RANGE_PERCENTAGE | entity-broadcast-range-percentage |
| 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) |
| FORCE_GAMEMODE | [force-gamemode](https://minecraft.wiki/w/Server.properties#force-gamemode) | | FUNCTION_PERMISSION_LEVEL | function-permission-level |
| 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) |
| GENERATE_STRUCTURES | [generate-structures](https://minecraft.wiki/w/Server.properties#generate-structures) | | HARDCORE | [hardcore](https://minecraft.wiki/w/Server.properties#hardcore) |
| HARDCORE | [hardcore](https://minecraft.wiki/w/Server.properties#hardcore) | | HIDE_ONLINE_PLAYERS | hide-online-players |
| HIDE_ONLINE_PLAYERS | [hide-online-players](https://minecraft.wiki/w/Server.properties#hide-online-players) | | LOG_IPS | log-ips |
| LOG_IPS | [log-ips](https://minecraft.wiki/w/Server.properties#log-ips) | | MAX_CHAINED_NEIGHBOR_UPDATES | max-chained-neighbor-updates |
| MANAGEMENT_SERVER_ENABLED | [management-server-enabled](https://minecraft.wiki/w/Server.properties#management-server-enabled) | | MAX_PLAYERS | [max-players](https://minecraft.wiki/w/Server.properties#max-players) |
| MANAGEMENT_SERVER_HOST | [management-server-host](https://minecraft.wiki/w/Server.properties#management-server-host) | | MAX_TICK_TIME | [max-tick-time](https://minecraft.wiki/w/Server.properties#max-tick-time) |
| MANAGEMENT_SERVER_PORT | [management-server-port](https://minecraft.wiki/w/Server.properties#management-server-port) | | MAX_WORLD_SIZE | [max-world-size](https://minecraft.wiki/w/Server.properties#max-world-size) |
| MANAGEMENT_SERVER_SECRET | [management-server-secret](https://minecraft.wiki/w/Server.properties#management-server-secret) | | NETWORK_COMPRESSION_THRESHOLD | network-compression-threshold |
| MANAGEMENT_SERVER_TLS_ENABLED | [management-server-tls-enabled](https://minecraft.wiki/w/Server.properties#management-server-tls-enabled) | | ONLINE_MODE | [online-mode](https://minecraft.wiki/w/Server.properties#online-mode) |
| MANAGEMENT_SERVER_TLS_KEYSTORE | [management-server-tls-keystore](https://minecraft.wiki/w/Server.properties#management-server-tls-keystore) | | OP_PERMISSION_LEVEL | op-permission-level |
| MANAGEMENT_SERVER_TLS_KEYSTORE_PASSWORD | [management-server-tls-keystore-password](https://minecraft.wiki/w/Server.properties#management-server-tls-keystore-password) | | PAUSE_WHEN_EMPTY_SECONDS | pause-when-empty-seconds |
| MAX_CHAINED_NEIGHBOR_UPDATES | [max-chained-neighbor-updates](https://minecraft.wiki/w/Server.properties#max-chained-neighbor-updates) | | PLAYER_IDLE_TIMEOUT | player-idle-timeout |
| MAX_PLAYERS | [max-players](https://minecraft.wiki/w/Server.properties#max-players) | | PREVENT_PROXY_CONNECTIONS | prevent-proxy-connections |
| MAX_TICK_TIME | [max-tick-time](https://minecraft.wiki/w/Server.properties#max-tick-time) | | PVP | [pvp](https://minecraft.wiki/w/Server.properties#pvp) |
| MAX_WORLD_SIZE | [max-world-size](https://minecraft.wiki/w/Server.properties#max-world-size) | | REGION_FILE_COMPRESSION | region-file-compression |
| NETWORK_COMPRESSION_THRESHOLD | [network-compression-threshold](https://minecraft.wiki/w/Server.properties#network-compression-threshold) | | RESOURCE_PACK_ID | resource-pack-id |
| ONLINE_MODE | [online-mode](https://minecraft.wiki/w/Server.properties#online-mode) | | RESOURCE_PACK_PROMPT | resource-pack-prompt |
| OP_PERMISSION_LEVEL | [op-permission-level](https://minecraft.wiki/w/Server.properties#op-permission-level) | | SERVER_NAME | [server-name](https://minecraft.wiki/w/Server.properties#server-name) |
| PAUSE_WHEN_EMPTY_SECONDS | [pause-when-empty-seconds](https://minecraft.wiki/w/Server.properties#pause-when-empty-seconds) | | SIMULATION_DISTANCE | simulation-distance |
| PLAYER_IDLE_TIMEOUT | [player-idle-timeout](https://minecraft.wiki/w/Server.properties#player-idle-timeout) | | SPAWN_MONSTERS | [spawn-monsters](https://minecraft.wiki/w/Server.properties#spawn-monsters) |
| PREVENT_PROXY_CONNECTIONS | [prevent-proxy-connections](https://minecraft.wiki/w/Server.properties#prevent-proxy-connections) | | SPAWN_PROTECTION | [spawn-protection](https://minecraft.wiki/w/Server.properties#spawn-protection) |
| PVP | [pvp](https://minecraft.wiki/w/Server.properties#pvp) | | SYNC_CHUNK_WRITES | sync-chunk-writes |
| RATE_LIMIT | [rate-limit](https://minecraft.wiki/w/Server.properties#rate-limit) | | USE_NATIVE_TRANSPORT | use-native-transport |
| REGION_FILE_COMPRESSION | [region-file-compression](https://minecraft.wiki/w/Server.properties#region-file-compression) | | VIEW_DISTANCE | [view-distance](https://minecraft.wiki/w/Server.properties#view-distance) |
| 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.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -29,7 +29,7 @@ where, in this case, the standard server port 25565, will be exposed on your hos
**DO NOT** port forward RCON on 25575 without first setting `RCON_PASSWORD` to a secure value. It is highly recommended to only use RCON within the container, such as with `rcon-cli`. **DO NOT** port forward RCON on 25575 without first setting `RCON_PASSWORD` to a secure value. It is highly recommended to only use RCON within the container, such as with `rcon-cli`.
By default, the container will download the latest version of the "vanilla" [Minecraft: Java Edition server](https://www.minecraft.net/en-us/download/server) provided by Mojang. The [`VERSION`](versions/minecraft.md) and the [`TYPE`](types-and-platforms/index.md) can be configured to create many variations of desired Minecraft server. By default, the container will download the latest version of the "vanilla" [Minecraft: Java Edition server](https://www.minecraft.net/en-us/download/server) provided by Mojang. The [`VERSION`](versions/java.md) and the [`TYPE`](types-and-platforms/index.md) can be configured to create many variations of desired Minecraft server.
## Using [Docker Compose](https://docs.docker.com/compose/) ## Using [Docker Compose](https://docs.docker.com/compose/)

View File

@@ -1,9 +1,5 @@
# Auto-Pause # Auto-Pause
!!! important
As of [1.21.2](https://minecraft.wiki/w/Java_Edition_1.21.2) it is not recommend to use this feature since Minecraft server natively auto-pauses when the server is empty. That is configured via the enivironment variable `PAUSE_WHEN_EMPTY_SECONDS`, which maps to the `pause-when-empty-seconds` server property.
An auto-pause functionality is provided that monitors whether clients are connected to the server. If a client is not connected for a specified time, the Java process is put into a pause state. When a client attempts to connect while the process is paused, then process will be restored to a running state. The experience for the client does not change. This feature can be enabled by setting the environment variable `ENABLE_AUTOPAUSE` to "true". An auto-pause functionality is provided that monitors whether clients are connected to the server. If a client is not connected for a specified time, the Java process is put into a pause state. When a client attempts to connect while the process is paused, then process will be restored to a running state. The experience for the client does not change. This feature can be enabled by setting the environment variable `ENABLE_AUTOPAUSE` to "true".
!!! important !!! important

View File

@@ -1,13 +1,7 @@
!!! tip "For advanced use only"
This page describes a capability that is not applicable to most users. It is only intended for rare cases when a very specific Java base image is needed or additional packages need to be installed that are not generally applicable or would bloat the image size.
Be sure to confirm that the desired [version and variant of Java isn't already provided](../versions/java.md).
## Building image locally with alternate Java base ## Building image locally with alternate Java base
An alternate Java base image can be specified by setting the [docker build argument](https://docs.docker.com/reference/cli/docker/buildx/build/#build-arg) `BASE_IMAGE` to the desired base image. The following shows an example of using the base image `ghcr.io/graalvm/graalvm-ce:ol8-java11`: The following shows how to change the base Java image used by the build:
```shell ```shell
docker build --build-arg BASE_IMAGE=ghcr.io/graalvm/graalvm-ce:ol8-java11 -t IMG_PREFIX/minecraft-server:java11-graalvm . docker build --build-arg BASE_IMAGE=ghcr.io/graalvm/graalvm-ce:ol8-java11 -t IMG_PREFIX/minecraft-server:java11-graalvm .

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. 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 ```shell
docker run -it --rm -v ${PWD}:/image/scripts --entrypoint bash mc-dev docker run -it --rm -v ${PWD}:/scripts -e SCRIPTS=/scripts/ --entrypoint bash mc-dev
``` ```
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: 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:
```shell ```shell
export VERSION=1.12.2 export VERSION=1.12.2
/image/scripts/start-deployFabric /scripts/start-magma
``` ```
...or pre-pending script execution: ...or pre-pending script execution:
```shell ```shell
VERSION=1.12.2 /image/scripts/start-deployFabric VERSION=1.12.2 /scripts/start-magma
``` ```
!!! note !!! note
@@ -69,28 +69,15 @@ VERSION=1.12.2 /image/scripts/start-deployFabric
## Using development copy of tools ## Using development copy of tools
In the cloned repo, such as [`mc-image-helper`](https://github.com/itzg/mc-image-helper), install the distribution locally by running: 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:
```shell ```shell
./gradlew installDist ./gradlew distTar
``` ```
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. !!! note
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: The distribution's version will be `0.0.0-<branch>-SNAPSHOT`
```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 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 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 ``` shell
> docker container inspect -f "{{.State.Health.Status}}" mc > docker container inspect -f "{{.State.Health.Status}}" mc
healthy 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 ``` yaml
healthcheck: healthcheck:
@@ -24,16 +24,9 @@ healthcheck:
retries: 20 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 health checks 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 healthchecks by setting the environment variable `DISABLE_HEALTHCHECK` to `true`.
The [health check in a Compose service declaration](https://docs.docker.com/reference/compose-file/services/#healthcheck) can also be disabled using: ### Healthchecks for older versions
```yaml This container disables Healthchecks for Versions before b1.8 as those versions do not support any kind of server pinging.
healthcheck: For more information see [Server List Ping](https://wiki.vg/Server_List_Ping#Beta_1.8_to_1.3)
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,14 +133,6 @@ The newline delimiting allows for compose file usage like:
https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot 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 ## 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 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,46 +2,28 @@
[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](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.
## Usage - **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:
```
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 https://modrinth.com/mod/fabric-api
---------- ----------
| |
+-- project slug +-- 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`.
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.
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 `@`.
You can also reference a file containing project entries by prefixing the **container path** path with `@`. | Description | Example projects entry |
|---------------------------------|-------------------------------------------------------|
### Examples | Select latest version | `fabric-api` |
| Select specific version | `fabric-api:bQZpGIz0`<br/>`fabric-api:0.119.2+1.21.4` |
| Description | Example projects entry | | Select latest beta version | `fabric-api:beta` |
|---------------------------------|-------------------------------------------------------| | Latest version using project ID | `P7dR8mSH` |
| Select latest version | `fabric-api` | | Latest version of datapack | `datapack:terralith` |
| Select specific version | `fabric-api:bQZpGIz0`<br/>`fabric-api:0.119.2+1.21.4` | | Specific version of datapack | `datapack:terralith:2.5.5` |
| Select latest beta version | `fabric-api:beta` | | Projects Listing File | `@/path/to/modrinth-mods.txt` |
| 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" !!! info "More about listing files"
@@ -60,33 +42,6 @@ You can also reference a file containing project entries by prefixing the **cont
datapack:terralith 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`.
!!! example
Given the environment variables
```yaml
MODRINTH_PROJECTS: |
viaversion
viabackwards
griefprevention
discordsrv
VERSION_FROM_MODRINTH_PROJECTS: true
```
Let's say all are supported on Minecraft up to 1.21.8 except griefprevention, which is only supported up to 1.21.7. In that case, `VERSION` will be automatically set to 1.21.7.
## Extra options ## Extra options
`MODRINTH_DOWNLOAD_DEPENDENCIES` `MODRINTH_DOWNLOAD_DEPENDENCIES`
@@ -95,6 +50,3 @@ When the environment variable `VERSION_FROM_MODRINTH_PROJECTS` is set to "true"
`MODRINTH_ALLOWED_VERSION_TYPE` `MODRINTH_ALLOWED_VERSION_TYPE`
: The version type is used to determine the newest version to use from each project. The allowed values are `release` (default), `beta`, `alpha`. Setting to `beta` will pick up both release and beta versions. Setting to `alpha` will pick up release, beta, and alpha versions. : The version type is used to determine the newest version to use from each project. The allowed values are `release` (default), `beta`, `alpha`. Setting to `beta` will pick up both release and beta versions. Setting to `alpha` will pick up release, beta, and alpha versions.
`MODRINTH_LOADER`
: When using a custom server, set this to specify which loader type will be requested during lookups

View File

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

View File

@@ -12,7 +12,6 @@ To manage a CurseForge modpack automatically with upgrade support, pinned or lat
Example if your key is `$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa`: Example if your key is `$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa`:
```yaml ```yaml
# compose.yaml
environment: environment:
CF_API_KEY: '$$11$$22$$33aaaaaaaaaaaaaaaaaaaaaaaaaa' CF_API_KEY: '$$11$$22$$33aaaaaaaaaaaaaaaaaaaaaaaaaa'
``` ```
@@ -22,30 +21,12 @@ To manage a CurseForge modpack automatically with upgrade support, pinned or lat
docker run ... -e CF_API_KEY='$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa' 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). You **do not** need to escape `$`'s with a second `$` in the `.env` file **as long as the key is wrapped in single quotes**. 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:
```
# .env
CF_API_KEY='$11$22$33aaaaaaaaaaaaaaaaaaaaaaaaaa'
```
The variable should to be referenced from the compose file, such as:
```yaml ```yaml
# compose.yaml
environment: environment:
CF_API_KEY: ${CF_API_KEY} 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: To use the equivalent with `docker run` you need to specify the `.env` file explicitly:
``` ```
docker run --env-file=.env itzg/minecraft-server docker run --env-file=.env itzg/minecraft-server

View File

@@ -41,27 +41,21 @@ A specific loader or launcher version other than the latest can be requested usi
FABRIC_LOADER_VERSION: 0.13.1 FABRIC_LOADER_VERSION: 0.13.1
``` ```
!!! note !!! note "Fabric API"
See the [Working with mods and plugins](../../mods-and-plugins/index.md) section to set up Fabric mods and configuration. As [mentioned on the Fabric download page](https://fabricmc.net/use/installer/), most mods will require the Fabric API mod to be installed. That can be easily done by utilizing [the Modrinth downloads feature](../../mods-and-plugins/modrinth.md), such as adding this to the `environment` of a compose file service:
## Fabric API ```yaml
TYPE: FABRIC
MODRINTH_PROJECTS: |
fabric-api
```
As [mentioned on the Fabric download page](https://fabricmc.net/use/installer/), most mods will require the Fabric API mod to be installed. That can be easily done by utilizing [the Modrinth downloads feature](../../mods-and-plugins/modrinth.md), such as adding this to the `environment` of a compose file service: !!! note "Alternate launcher"
```yaml If you wish to use an alternative launcher you can:
TYPE: FABRIC
MODRINTH_PROJECTS: |
fabric-api
```
## Alternate launcher - Provide the path to a custom launcher jar available to the container with `FABRIC_LAUNCHER`, relative to `/data` (such as `-e FABRIC_LAUNCHER=fabric-server-custom.jar`)
- Provide the URL to a custom launcher jar with `FABRIC_LAUNCHER_URL` (such as `-e FABRIC_LAUNCHER_URL=http://HOST/fabric-server-custom.jar`)
If you wish to use an alternative launcher you can: See the [Working with mods and plugins](../../mods-and-plugins/index.md) section to set up Fabric mods and configuration.
- Provide the path to a custom launcher jar available to the container with `FABRIC_LAUNCHER`, relative to `/data` (such as `-e FABRIC_LAUNCHER=fabric-server-custom.jar`)
- Provide the URL to a custom launcher jar with `FABRIC_LAUNCHER_URL` (such as `-e FABRIC_LAUNCHER_URL=http://HOST/fabric-server-custom.jar`)
## Force re-install
If the Fabric launcher jar becomes corrupted you can temporarily set FABRIC_FORCE_REINSTALL to "true" to have it re-installed on next startup.

View File

@@ -45,11 +45,6 @@ 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. 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 ## Alternatives
### NeoForge ### NeoForge

View File

@@ -41,9 +41,7 @@ Configuration options with defaults:
## NanoLimbo ## NanoLimbo
A [NanoLimbo](https://github.com/BoomEaro/NanoLimbo) server can be run by setting `TYPE` to `NANOLIMBO`. A [NanoLimbo](https://github.com/Nan1t/NanoLimbo) server can be run by setting `TYPE` to `NANOLIMBO`.
Note: it is a fork of the original [NanoLimbo](https://github.com/Nan1t/NanoLimbo) made by Nan1t
An alternate Limbo server An alternate Limbo server

View File

@@ -126,7 +126,3 @@ If you have attached a host directory to the `/data` volume, then you can instal
!!! note !!! note
The Folia type inherits from the Paper type. Paper's variables will override the Folia ones. The Folia type inherits from the Paper type. Paper's variables will override the Folia ones.
## Extra config
- `SKIP_DOWNLOAD_DEFAULTS`: when set to "true" startup will entirely skip checking for default Paper/Bukkit/Spigot config files to download

View File

@@ -10,29 +10,29 @@ or explicitly include the tag, such as
where `<tag>` refers to the first column of this table: where `<tag>` refers to the first column of this table:
| Tag | Java version | Linux | JVM Type | Architecture | Note | | Tag | Java version | Linux | JVM Type | Architecture | Note |
|----------------|--------------|--------|--------------------|---------------------|------| |------------------|--------------|--------|--------------------|---------------------|------|
| latest | 21 | Ubuntu | Hotspot | amd64, arm64 | | | latest | 21 | Ubuntu | Hotspot | amd64, arm64 | |
| stable | 21 | Ubuntu | Hotspot | amd64, arm64 | | | stable | 21 | Ubuntu | Hotspot | amd64, arm64 | |
| java25 | 25 | Ubuntu | Hotspot | amd64, arm64 | | | java24 | 24 | Ubuntu | Hotspot | amd64, arm64 | (2) |
| java25-graalvm | 25 | Oracle | Oracle GraalVM (3) | amd64, arm64 | | | java24-graalvm | 24 | Oracle | Oracle GraalVM (3) | amd64, arm64 | (2) |
| java21 | 21 | Ubuntu | Hotspot | amd64, arm64 | | | java21 | 21 | Ubuntu | Hotspot | amd64, arm64 | |
| java21-jdk | 21 | Ubuntu | Hotspot+JDK | amd64, arm64 | | | java21-jdk | 21 | Ubuntu | Hotspot+JDK | amd64, arm64 | |
| java21-alpine | 21 | Alpine | Hotspot | amd64, arm64 | | | java21-alpine | 21 | Alpine | Hotspot | amd64, arm64 | |
| java21-graalvm | 21 | Oracle | Oracle GraalVM (3) | amd64, arm64 | | | java21-graalvm | 21 | Oracle | Oracle GraalVM (3) | amd64, arm64 | |
| java17 | 17 | Ubuntu | Hotspot | amd64, arm64, armv7 | | | java17 | 17 | Ubuntu | Hotspot | amd64, arm64, armv7 | |
| java17-graalvm | 17 | Oracle | Oracle GraalVM (3) | amd64, arm64 | | | java17-graalvm | 17 | Oracle | Oracle GraalVM (3) | amd64, arm64 | |
| java17-alpine | 17 | Alpine | Hotspot | amd64 (1) | | | java17-alpine | 17 | Alpine | Hotspot | amd64 (1) | |
| java16 | 16 | Ubuntu | Hotspot | amd64, arm64, armv7 | (4) | | java8 | 8 | Ubuntu | Hotspot | amd64, arm64, armv7 | |
| java11 | 11 | Ubuntu | Hotspot | amd64, arm64, armv7 | | | java8-jdk | 8 | Ubuntu | Hotspot+JDK | amd64 | |
| java8 | 8 | Ubuntu | Hotspot | amd64, arm64, armv7 | | | java8-openj9 | 8 | Debian | OpenJ9 | amd64 | |
| java8-graalvm-ce | 8 | Oracle | GraalVM CE | amd64 | |
Notes Notes
1. Why no arm64 for Java 17 Alpine? That is because the base images, such as [elipse-temurin](https://hub.docker.com/_/eclipse-temurin/tags?page=&page_size=&ordering=&name=17-jre-alpine) do not provide support for that. Use the Ubuntu based images instead. 1. Why no arm64 for Java 17 Alpine? That is because the base images, such as [elipse-temurin](https://hub.docker.com/_/eclipse-temurin/tags?page=&page_size=&ordering=&name=17-jre-alpine) do not provide support for that. Use the Ubuntu based images instead.
2. Short-term variant, subject to deprecation upon next version introduction 2. Short-term variant, subject to deprecation upon next version introduction
3. Based on the [Oracle GraalMV images](https://blogs.oracle.com/java/post/new-oracle-graalvm-container-images), which as of JDK 17, are now under the [GraalVM Free License](https://blogs.oracle.com/java/post/graalvm-free-license) incorporating what used to be known as the GraalVM Enterprise. 3. Based on the [Oracle GraalMV images](https://blogs.oracle.com/java/post/new-oracle-graalvm-container-images), which as of JDK 17, are now under the [GraalVM Free License](https://blogs.oracle.com/java/post/graalvm-free-license) incorporating what used to be known as the GraalVM Enterprise.
4. This version of Java is [recommended for PaperMC 1.16.5](https://docs.papermc.io/paper/getting-started/#requirements)
!!! example "Example using java8" !!! example "Example using java8"
@@ -131,16 +131,12 @@ The following image tags have been deprecated and are no longer receiving update
- adopt15 - adopt15
- openj9-nightly - openj9-nightly
- multiarch-latest - multiarch-latest
- java16-openj9 - java11
- java16/java16-openj9
- java17-graalvm-ce - java17-graalvm-ce
- java17-openj9 - java17-openj9
- java19 - java19
- java20-graalvm, java20, java20-alpine - java20-graalvm, java20, java20-alpine
- java23-* - java23-*
- java24, java24-graalvm
- java8-multiarch is still built and pushed, but please move to java8 instead - java8-multiarch is still built and pushed, but please move to java8 instead
- java8-alpine, java8-jdk, java8-openj9, java8-graalvm-ce - java8-alpine
## 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

@@ -1,16 +0,0 @@
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

@@ -9,11 +9,12 @@ services:
EULA: true EULA: true
ALLOW_FLIGHT: true ALLOW_FLIGHT: true
MOD_PLATFORM: AUTO_CURSEFORGE MOD_PLATFORM: AUTO_CURSEFORGE
# Allocate API key from https://console.curseforge.com/
# and set in .env file making sure to double up dollar signs, such as
# CF_API_KEY=$$2a$$10$$....
# Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
CF_API_KEY: ${CF_API_KEY} CF_API_KEY: ${CF_API_KEY}
CF_SLUG: craftoria CF_SLUG: craftoria
MOTD: |
A %TYPE% server on %VERSION%
running %MODPACK_NAME% %MODPACK_VERSION%
MEMORY: 8G MEMORY: 8G
volumes: volumes:
# Use managed volume by default, but can change to a relative path like # Use managed volume by default, but can change to a relative path like

View File

@@ -0,0 +1,157 @@
####################################################################
# 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

@@ -0,0 +1,19 @@
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

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

View File

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

View File

@@ -9,24 +9,15 @@ services:
environment: environment:
EULA: "TRUE" EULA: "TRUE"
TYPE: CUSTOM TYPE: CUSTOM
GENERIC_PACKS: GT_New_Horizons_2.8.0_Server_Java_17-25 GENERIC_PACKS: GT_New_Horizons_2.7.2_Server_Java_17-21
GENERIC_PACKS_SUFFIX: .zip GENERIC_PACKS_SUFFIX: .zip
GENERIC_PACKS_PREFIX: https://downloads.gtnewhorizons.com/ServerPacks/ GENERIC_PACKS_PREFIX: https://downloads.gtnewhorizons.com/ServerPacks/
# if this isn't true, then the container tries to download the modpack every run # if this isn't true, then the container tries to download the modpack every run
SKIP_GENERIC_PACK_UPDATE_CHECK: "true" SKIP_GENERIC_PACK_UPDATE_CHECK: "true"
MEMORY: 6G MEMORY: 6G
# Make sure that this matches what is in your pack's startserver bash file # Make sure that this matches what is in your pack's startserver bash file
JVM_OPTS: "-Dfml.readTimeout=180 @java9args.txt" JVM_OPTS: -Dfml.readTimeout=180 @java9args.txt
CUSTOM_SERVER: "lwjgl3ify-forgePatches.jar" CUSTOM_JAR_EXEC: -jar lwjgl3ify-forgePatches.jar nogui
# 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: volumes:
# attach a managed volume, change to a relative or absolute host directory if needed # attach a managed volume, change to a relative or absolute host directory if needed
- mc-data:/data - mc-data:/data

View File

@@ -1,15 +0,0 @@
services:
mc:
image: itzg/minecraft-server
environment:
EULA: true
TYPE: paper
MODRINTH_PROJECTS: |
viaversion
viabackwards
griefprevention
discordsrv
VERSION_FROM_MODRINTH_PROJECTS: true
MEMORY: 2G
ports:
- "25565:25565"

View File

@@ -1,16 +0,0 @@
services:
mc:
image: itzg/minecraft-server
tty: true
stdin_open: true
environment:
EULA: true
# Match loader from versions section of https://github.com/packwiz/packwiz-example-pack/blob/v1/pack.toml
TYPE: QUILT
VERSION: "1.19"
QUILT_LOADER_VERSION: "0.17.0"
PACKWIZ_URL: https://raw.githubusercontent.com/packwiz/packwiz-example-pack/refs/heads/v1/pack.toml
volumes:
- ./data:/data
ports:
- "25565:25565"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -18,7 +18,6 @@
"better-tips-nbt-tag", "better-tips-nbt-tag",
"betterf3", "betterf3",
"betterfps", "betterfps",
"bettergrassify",
"biomeinfo", "biomeinfo",
"block-drops-jei-addon", "block-drops-jei-addon",
"blur-forge", "blur-forge",
@@ -27,10 +26,7 @@
"cherished-worlds", "cherished-worlds",
"chunk-animator", "chunk-animator",
"clickable-advancements", "clickable-advancements",
"colorwheel",
"colorwheel-patcher",
"compass-coords", "compass-coords",
"config-menus-forge",
"configured", "configured",
"controllable", "controllable",
"controlling", "controlling",
@@ -40,7 +36,6 @@
"dark-mode-everywhere", "dark-mode-everywhere",
"defensive-measures", "defensive-measures",
"ding", "ding",
"distraction-free-recipes",
"drippy-loading-screen", "drippy-loading-screen",
"dynamic-surroundings", "dynamic-surroundings",
"dynamic-view", "dynamic-view",
@@ -67,8 +62,6 @@
"fancymenu", "fancymenu",
"farsight", "farsight",
"faster-ladder-climbing", "faster-ladder-climbing",
"fastquit",
"fastquit-forge",
"flerovium", "flerovium",
"foamfix-optimization-mod", "foamfix-optimization-mod",
"forgeskyboxes", "forgeskyboxes",
@@ -110,14 +103,10 @@
"no-recipe-book", "no-recipe-book",
"not-enough-animations", "not-enough-animations",
"oculus", "oculus",
"ok-zoomer",
"oldjavawarning", "oldjavawarning",
"overloaded-armor-bar", "overloaded-armor-bar",
"packmenu", "packmenu",
"packmodemenu", "packmodemenu",
"particle-effects",
"particle-effects-reforged",
"particle-rain",
"particular", "particular",
"particular-reforged", "particular-reforged",
"reauth", "reauth",
@@ -161,10 +150,8 @@
"vanillafix", "vanillafix",
"visuality", "visuality",
"waila-harvestability", "waila-harvestability",
"waila-stages",
"wakes-reforged", "wakes-reforged",
"wawla", "wawla",
"welcome-screen",
"xaeroplus", "xaeroplus",
"yungs-menu-tweaks", "yungs-menu-tweaks",
"zume" "zume"
@@ -179,17 +166,6 @@
"create-arcane-engineering": { "create-arcane-engineering": {
"forceIncludes": ["just-enough-resources-jer"] "forceIncludes": ["just-enough-resources-jer"]
}, },
"mc-eternal-2": {
"forceIncludes": [
"particular-reforged",
"mob-player-animator"
]
},
"reclamation-reclaim-the-world": {
"forceIncludes": [
"more-overlays-updated"
]
},
"skyfactory-5": { "skyfactory-5": {
"forceIncludes": [ "forceIncludes": [
"colored-torches", "colored-torches",

View File

@@ -11,8 +11,6 @@
"BadOptimizations", "BadOptimizations",
"BetterAdvancements", "BetterAdvancements",
"betterbeds", "betterbeds",
"BetterF3",
"BetterGrassify",
"BetterThirdPerson", "BetterThirdPerson",
"BHMenu", "BHMenu",
"blur", "blur",
@@ -24,22 +22,14 @@
"cherishedworlds", "cherishedworlds",
"citresewn", "citresewn",
"clickadv", "clickadv",
"cobblemon-ui-tweaks",
"compass-coords", "compass-coords",
"colorwheel",
"connectedness", "connectedness",
"connector", "connector",
"continuity",
"controlling",
"craftpresence", "craftpresence",
"cwb", "cwb",
"DisableCustomWorldsAdvice", "DisableCustomWorldsAdvice",
"distraction_free_recipes",
"drippyloadingscreen", "drippyloadingscreen",
"eating-animation", "eating-animation",
"emi",
"emi_loot",
"emi_trade",
"emiffect", "emiffect",
"emitrades", "emitrades",
"entity_model_features", "entity_model_features",
@@ -49,17 +39,14 @@
"fallingleaves", "fallingleaves",
"fancymenu", "fancymenu",
"fast-ip-ping", "fast-ip-ping",
"fastquit",
"FauxCustomEntityData", "FauxCustomEntityData",
"feytweaks", "feytweaks",
"figura", "figura",
"ForgeConfigScreens",
"GeckoLibIrisCompat", "GeckoLibIrisCompat",
"gpumemleakfix", "gpumemleakfix",
"Highlighter", "Highlighter",
"ImmediatelyFast", "ImmediatelyFast",
"indium", "indium",
"inventory-profiles-next",
"iris", "iris",
"iris-flywheel", "iris-flywheel",
"ItemBorders", "ItemBorders",
@@ -75,16 +62,13 @@
"nicer-skies", "nicer-skies",
"notenoughanimations", "notenoughanimations",
"oculus", "oculus",
"ok_zoomer",
"OverflowingBars", "OverflowingBars",
"particlerain",
"PickUpNotifier", "PickUpNotifier",
"PresenceFootsteps", "PresenceFootsteps",
"Prism", "Prism",
"reeses_sodium_options",
"reforgium", "reforgium",
"reeses_sodium_options",
"ResourcePackOverrides", "ResourcePackOverrides",
"roughly-enough-items",
"ryoamiclights", "ryoamiclights",
"screenshot_viewer", "screenshot_viewer",
"Searchables", "Searchables",
@@ -93,24 +77,13 @@
"skinlayers3d", "skinlayers3d",
"sodium", "sodium",
"sorted_enchantments", "sorted_enchantments",
"tooltipfix",
"visuality", "visuality",
"VR-Combat", "VR-Combat",
"WailaStages",
"welcomescreen",
"Xaeros_Minimap",
"XaerosWorldMap",
"YeetusExperimentus", "YeetusExperimentus",
"yungsmenutweaks", "yungsmenutweaks",
"Zoomify", "Zoomify",
"zume" "zume"
], ],
"globalForceIncludes": [], "globalForceIncludes": [],
"modpacks": { "modpacks": {}
"cobbleverse": {
"excludes": [
"cloth-config"
]
}
}
} }

View File

@@ -1,11 +1,10 @@
{ {
"accepts-transfers": {"env": "ACCEPTS_TRANSFERS"},
"allow-flight": {"env": "ALLOW_FLIGHT"}, "allow-flight": {"env": "ALLOW_FLIGHT"},
"allow-nether": {"env": "ALLOW_NETHER"}, "allow-nether": {"env": "ALLOW_NETHER"},
"bug-report-link": {"env": "BUG_REPORT_LINK"},
"announce-player-achievements": {"env": "ANNOUNCE_PLAYER_ACHIEVEMENTS"}, "announce-player-achievements": {"env": "ANNOUNCE_PLAYER_ACHIEVEMENTS"},
"broadcast-console-to-ops": {"env": "BROADCAST_CONSOLE_TO_OPS"}, "broadcast-console-to-ops": {"env": "BROADCAST_CONSOLE_TO_OPS"},
"broadcast-rcon-to-ops": {"env": "BROADCAST_RCON_TO_OPS"}, "broadcast-rcon-to-ops": {"env": "BROADCAST_RCON_TO_OPS"},
"bug-report-link": {"env": "BUG_REPORT_LINK"},
"difficulty": {"env": "DIFFICULTY"}, "difficulty": {"env": "DIFFICULTY"},
"enable-command-block": {"env": "ENABLE_COMMAND_BLOCK"}, "enable-command-block": {"env": "ENABLE_COMMAND_BLOCK"},
"enable-jmx-monitoring": {"env": "ENABLE_JMX"}, "enable-jmx-monitoring": {"env": "ENABLE_JMX"},
@@ -28,13 +27,6 @@
"level-seed": {"env": "SEED"}, "level-seed": {"env": "SEED"},
"level-type": {"env": "LEVEL_TYPE"}, "level-type": {"env": "LEVEL_TYPE"},
"log-ips": {"env": "LOG_IPS"}, "log-ips": {"env": "LOG_IPS"},
"management-server-enabled": {"env": "MANAGEMENT_SERVER_ENABLED"},
"management-server-host": {"env": "MANAGEMENT_SERVER_HOST"},
"management-server-port": {"env": "MANAGEMENT_SERVER_PORT"},
"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-build-height": {"env": "MAX_BUILD_HEIGHT"},
"max-chained-neighbor-updates": {"env": "MAX_CHAINED_NEIGHBOR_UPDATES"}, "max-chained-neighbor-updates": {"env": "MAX_CHAINED_NEIGHBOR_UPDATES"},
"max-players": {"env": "MAX_PLAYERS"}, "max-players": {"env": "MAX_PLAYERS"},
@@ -50,15 +42,14 @@
"previews-chat": {"env": "PREVIEWS_CHAT"}, "previews-chat": {"env": "PREVIEWS_CHAT"},
"pvp": {"env": "PVP"}, "pvp": {"env": "PVP"},
"query.port": {"env": "QUERY_PORT"}, "query.port": {"env": "QUERY_PORT"},
"rate-limit": {"env": "RATE_LIMIT"},
"rcon.password": {"env": "RCON_PASSWORD"}, "rcon.password": {"env": "RCON_PASSWORD"},
"rcon.port": {"env": "RCON_PORT"}, "rcon.port": {"env": "RCON_PORT"},
"region-file-compression": {"env": "REGION_FILE_COMPRESSION"}, "region-file-compression": {"env": "REGION_FILE_COMPRESSION"},
"require-resource-pack": {"env": "RESOURCE_PACK_ENFORCE"}, "resource-pack": {"env": "RESOURCE_PACK"},
"resource-pack-id": {"env": "RESOURCE_PACK_ID"}, "resource-pack-id": {"env": "RESOURCE_PACK_ID"},
"resource-pack-prompt": {"env": "RESOURCE_PACK_PROMPT"}, "resource-pack-prompt": {"env": "RESOURCE_PACK_PROMPT"},
"resource-pack-sha1": {"env": "RESOURCE_PACK_SHA1"}, "resource-pack-sha1": {"env": "RESOURCE_PACK_SHA1"},
"resource-pack": {"env": "RESOURCE_PACK"}, "require-resource-pack": {"env": "RESOURCE_PACK_ENFORCE"},
"server-ip": {"env": "SERVER_IP"}, "server-ip": {"env": "SERVER_IP"},
"server-name": {"env": "SERVER_NAME"}, "server-name": {"env": "SERVER_NAME"},
"server-port": {"env": "SERVER_PORT"}, "server-port": {"env": "SERVER_PORT"},
@@ -68,7 +59,6 @@
"spawn-monsters": {"env": "SPAWN_MONSTERS"}, "spawn-monsters": {"env": "SPAWN_MONSTERS"},
"spawn-npcs": {"env": "SPAWN_NPCS"}, "spawn-npcs": {"env": "SPAWN_NPCS"},
"spawn-protection": {"env": "SPAWN_PROTECTION"}, "spawn-protection": {"env": "SPAWN_PROTECTION"},
"status-heartbeat-interval": {"env": "STATUS_HEARTBEAT_INTERVAL"},
"sync-chunk-writes": {"env": "SYNC_CHUNK_WRITES"}, "sync-chunk-writes": {"env": "SYNC_CHUNK_WRITES"},
"use-native-transport": {"env": "USE_NATIVE_TRANSPORT"}, "use-native-transport": {"env": "USE_NATIVE_TRANSPORT"},
"view-distance": {"env": "VIEW_DISTANCE"}, "view-distance": {"env": "VIEW_DISTANCE"},

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -2,31 +2,22 @@
set -eu set -eu
# shellcheck source=start-utils # shellcheck source=start-utils
. "$(dirname "$0")/start-utils" . "${SCRIPTS:-/}start-utils"
export TYPE=FABRIC export TYPE=FABRIC
: "${FABRIC_LAUNCHER_VERSION:=${FABRIC_INSTALLER_VERSION:-LATEST}}" : "${FABRIC_LAUNCHER_VERSION:=${FABRIC_INSTALLER_VERSION:-LATEST}}"
: "${FABRIC_LAUNCHER:=}" : "${FABRIC_LAUNCHER:=}"
: "${FABRIC_LAUNCHER_URL:=}" : "${FABRIC_LAUNCHER_URL:=}"
: "${FABRIC_LOADER_VERSION:=LATEST}" : "${FABRIC_LOADER_VERSION:=LATEST}"
: "${FABRIC_FORCE_REINSTALL:=false}"
resultsFile=/data/.install-fabric.env resultsFile=/data/.install-fabric.env
isDebugging && set -x isDebugging && set -x
commonArgs=(
--results-file="${resultsFile}"
)
if isTrue "${FABRIC_FORCE_REINSTALL}"; then
log "Forcing re-install of Fabric"
commonArgs+=(--force-reinstall)
fi
# Custom fabric jar # Custom fabric jar
if [[ $FABRIC_LAUNCHER ]]; then if [[ $FABRIC_LAUNCHER ]]; then
if ! mc-image-helper install-fabric-loader \ if ! mc-image-helper install-fabric-loader \
"${commonArgs[@]}" \ --results-file=${resultsFile} \
--from-local-file="$FABRIC_LAUNCHER"; then --from-local-file="$FABRIC_LAUNCHER"; then
logError "Failed to use provided Fabric launcher" logError "Failed to use provided Fabric launcher"
exit 1 exit 1
@@ -35,7 +26,7 @@ if [[ $FABRIC_LAUNCHER ]]; then
# Custom fabric jar url # Custom fabric jar url
elif [[ $FABRIC_LAUNCHER_URL ]]; then elif [[ $FABRIC_LAUNCHER_URL ]]; then
if ! mc-image-helper install-fabric-loader \ if ! mc-image-helper install-fabric-loader \
"${commonArgs[@]}" \ --results-file=${resultsFile} \
--from-url="$FABRIC_LAUNCHER_URL"; then --from-url="$FABRIC_LAUNCHER_URL"; then
logError "Failed to installFabric launcher from $FABRIC_LAUNCHER_URL" logError "Failed to installFabric launcher from $FABRIC_LAUNCHER_URL"
exit 1 exit 1
@@ -44,7 +35,7 @@ elif [[ $FABRIC_LAUNCHER_URL ]]; then
# Official fabric launcher # Official fabric launcher
else else
if ! mc-image-helper install-fabric-loader \ if ! mc-image-helper install-fabric-loader \
"${commonArgs[@]}" \ --results-file=${resultsFile} \
--minecraft-version="${VERSION}" \ --minecraft-version="${VERSION}" \
--installer-version="${FABRIC_LAUNCHER_VERSION}" \ --installer-version="${FABRIC_LAUNCHER_VERSION}" \
--loader-version="${FABRIC_LOADER_VERSION}"; then --loader-version="${FABRIC_LOADER_VERSION}"; then
@@ -56,4 +47,4 @@ fi
applyResultsFile ${resultsFile} applyResultsFile ${resultsFile}
export FAMILY=FABRIC export FAMILY=FABRIC
exec "$(dirname "$0")/start-setupWorld" "$@" exec "${SCRIPTS:-/}start-setupWorld" "$@"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,164 +1,19 @@
#!/bin/bash #!/bin/bash
# shellcheck source=start-utils # shellcheck source=start-utils
. "$(dirname "$0")/start-utils" . "${SCRIPTS:-/}start-utils"
isDebugging && set -x isDebugging && set -x
if ! SERVER=$(mc-image-helper github download-latest-asset \ if ! SERVER=$(mc-image-helper github download-latest-asset \
--output-directory=/data \ --output-directory=/data \
--name-pattern="NanoLimbo(-.+?(?<!-sources))?\.jar" \ --name-pattern="NanoLimbo-.+?(?<!-sources)\.jar" \
BoomEaro/NanoLimbo Nan1t/NanoLimbo
); then ); then
logError "Failed to download NanoLimbo" logError "Failed to download NanoLimbo"
exit 1 exit 1
fi 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 SERVER
export FAMILY=LIMBO export FAMILY=LIMBO
exec "$(dirname "$0")/start-setupMounts" "$@" exec ${SCRIPTS:-/}start-setupMounts "$@"

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