mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-10-19 17:28:14 +00:00
Compare commits
99
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
644cd1271e | ||
|
|
6e226b2ab4 | ||
|
|
dbb0909282 | ||
|
|
2ae1097bb9 | ||
|
|
4cb8a05f9c | ||
|
|
8f08edec05 | ||
|
|
ec504b2338 | ||
|
|
0ff20db743 | ||
|
|
d8cd6f3f38 | ||
|
|
9693e382f3 | ||
|
|
cf72f1573f | ||
|
|
b5596f6296 | ||
|
|
de5350c08e | ||
|
|
7934d32399 | ||
|
|
11b8d5b219 | ||
|
|
a4537cc608 | ||
|
|
8677b16ff2 | ||
|
|
ece38ad37d | ||
|
|
bb27fd9fef | ||
|
|
2d2d683ef5 | ||
|
|
a1de0d20f7 | ||
|
|
a7583e0477 | ||
|
|
70b3f73ebc | ||
|
|
b3e6608470 | ||
|
|
685024a482 | ||
|
|
8541fa98c2 | ||
|
|
d85a019c57 | ||
|
|
5cb3f0a652 | ||
|
|
b94d51517d | ||
|
|
beed693663 | ||
|
|
770966bf5e | ||
|
|
67d1453ee1 | ||
|
|
7ea3f76d41 | ||
|
|
47130bb030 | ||
|
|
93f5a03995 | ||
|
|
00449564a8 | ||
|
|
b0f2be88cc | ||
|
|
685c16d6dc | ||
|
|
3a682c49f4 | ||
|
|
f3fe8284e5 | ||
|
|
79a5346182 | ||
|
|
c469eadc36 | ||
|
|
229a72cf60 | ||
|
|
d5b902899c | ||
|
|
8bf579f326 | ||
|
|
2ef336ad09 | ||
|
|
ef9a00021e | ||
|
|
94494ed744 | ||
|
|
f4b751be15 | ||
|
|
22749e08b7 | ||
|
|
efade6567b | ||
|
|
b934ff3dc6 | ||
|
|
617a626cee | ||
|
|
73fb517b5d | ||
|
|
556afff5c2 | ||
|
|
62f0e5f25e | ||
|
|
bededca888 | ||
|
|
52001b4dcb | ||
|
|
52c865361a | ||
|
|
da99021d88 | ||
|
|
13fff11fcf | ||
|
|
82d89ee4eb | ||
|
|
b0fbd35f7d | ||
|
|
99f3a841f4 | ||
|
|
3eaa1be6fb | ||
|
|
f4fc9382ca | ||
|
|
f7f115182b | ||
|
|
9100b32093 | ||
|
|
bbc31603e2 | ||
|
|
430805da64 | ||
|
|
dd7644daf5 | ||
|
|
235be828d8 | ||
|
|
3f7737bc05 | ||
|
|
319582ae22 | ||
|
|
8df827ed27 | ||
|
|
9f8248206c | ||
|
|
6d6c99ff6b | ||
|
|
6417a93920 | ||
|
|
2a0a0e651f | ||
|
|
f61f72196b | ||
|
|
9d6aefc153 | ||
|
|
d62afadb5d | ||
|
|
f5d94230e8 | ||
|
|
cfceb23ae4 | ||
|
|
f0e8df639d | ||
|
|
d8e2c90d5c | ||
|
|
68d99f434d | ||
|
|
f93230f6a8 | ||
|
|
2826f51f5f | ||
|
|
218826cba0 | ||
|
|
91b98bcc7b | ||
|
|
21b134fd2b | ||
|
|
9b12eb6a6c | ||
|
|
14c83f1015 | ||
|
|
7ba5a858b9 | ||
|
|
8bf8a7bc8d | ||
|
|
bbb8f7ffec | ||
|
|
4657c5f8f3 | ||
|
|
4fc54b9e43 |
No files matched your search
@@ -94,27 +94,25 @@ jobs:
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.16.5
|
||||
# Pin version for pre-Java 17
|
||||
mcHelperVersion: 1.51.4-java8
|
||||
mcHelperVersion: 1.51.5-java8
|
||||
# JAVA 11
|
||||
- variant: java11
|
||||
baseImage: adoptopenjdk:11-jre-hotspot
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.16.4
|
||||
# Pin version for pre-Java 17
|
||||
mcHelperVersion: 1.51.4-java8
|
||||
mcHelperVersion: 1.51.5-java8
|
||||
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
|
||||
- variant: java8
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
baseImage: eclipse-temurin:8-jre
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
# Pin version for Java 8, also be sure to set in verify-pr.yml
|
||||
mcHelperVersion: 1.51.4-java8
|
||||
mcHelperVersion: 1.51.5-java8
|
||||
- variant: java8-jdk
|
||||
baseImage: eclipse-temurin:8u312-b07-jdk-focal
|
||||
baseImage: eclipse-temurin:8-jdk
|
||||
platforms: linux/amd64,linux/arm64
|
||||
mcVersion: 1.12.2
|
||||
# Pin version for Java 8, also be sure to set in verify-pr.yml
|
||||
mcHelperVersion: 1.51.4-java8
|
||||
mcHelperVersion: 1.51.5-java8
|
||||
env:
|
||||
# Assume they line up, but when forked change to your Docker Hub username
|
||||
DOCKER_HUB_ORG: ${{ github.repository_owner }}
|
||||
@@ -166,7 +164,7 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v4.2.0
|
||||
uses: docker/setup-qemu-action@v4.4.0
|
||||
|
||||
- name: Build for test
|
||||
uses: docker/build-push-action@v7
|
||||
@@ -195,14 +193,14 @@ jobs:
|
||||
tests/test.sh
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v4.5.2
|
||||
uses: docker/login-action@v4.6.0
|
||||
if: env.HAS_IMAGE_REPO_ACCESS == 'true'
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v4.5.2
|
||||
uses: docker/login-action@v4.6.0
|
||||
if: env.HAS_IMAGE_REPO_ACCESS == 'true'
|
||||
with:
|
||||
registry: ghcr.io
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
name: Discord notifications
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
workflow_run:
|
||||
workflows: ["Build and Publish"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
||||
jobs:
|
||||
discord:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
if: github.repository_owner == 'itzg'
|
||||
steps:
|
||||
- name: on-publish
|
||||
if: github.event_name == 'release' && github.event.action == 'published'
|
||||
uses: SethCohen/github-releases-to-discord@v1.20.0
|
||||
with:
|
||||
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
- name: on-success
|
||||
if: github.event.workflow_run.conclusion == 'success'
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: |
|
||||
Github repo: ${{ github.repository }}
|
||||
- Branch: ${{ github.event.workflow_run.head_branch }}
|
||||
- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)
|
||||
- Status: 🎉 ${{ github.event.workflow_run.conclusion }} 🍏
|
||||
- name: on-failure
|
||||
if: github.event.workflow_run.conclusion == 'failure'
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: |
|
||||
Github repo: ${{ github.repository }}
|
||||
- Branch: ${{ github.event.workflow_run.head_branch }}
|
||||
- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)
|
||||
- Status: 🤔 ${{ github.event.workflow_run.conclusion }} 💣💥
|
||||
@@ -55,13 +55,14 @@ jobs:
|
||||
knockdRepoOrg: Metalcape/knock
|
||||
# JAVA 8:
|
||||
- variant: java8
|
||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
||||
# make sure to track the base image version in build.yml
|
||||
baseImage: eclipse-temurin:8-jre
|
||||
platforms: linux/amd64
|
||||
mcVersion: 1.12.2
|
||||
# For GLIBC_2.34 support
|
||||
knockdRepoOrg: Metalcape/knock
|
||||
# Pin version for Java 8, be sure to also set in build.yml
|
||||
mcHelperVersion: 1.51.4-java8
|
||||
mcHelperVersion: 1.51.5-java8
|
||||
env:
|
||||
IMAGE_TO_TEST: ${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}
|
||||
runs-on: ubuntu-22.04
|
||||
@@ -76,7 +77,7 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v4.2.0
|
||||
uses: docker/setup-qemu-action@v4.4.0
|
||||
|
||||
- name: Confirm multi-arch build
|
||||
uses: docker/build-push-action@v7
|
||||
|
||||
+7
-7
@@ -17,7 +17,7 @@ ARG KNOCKD_REPO_ORG=Metalcape/knock
|
||||
RUN --mount=target=/build,source=build \
|
||||
TARGET=${TARGETARCH}${TARGETVARIANT} \
|
||||
/build/run.sh install-packages
|
||||
COPY --from=tianon/gosu /gosu /usr/local/bin/
|
||||
COPY --from=tianon/gosu:1.19 /gosu /usr/local/bin/
|
||||
|
||||
RUN --mount=target=/build,source=build \
|
||||
/build/run.sh setup-user
|
||||
@@ -28,36 +28,36 @@ ARG APPS_REV=1
|
||||
ARG GITHUB_BASEURL=https://github.com
|
||||
|
||||
# renovate: datasource=github-releases packageName=itzg/easy-add
|
||||
ARG EASY_ADD_VERSION=0.8.15
|
||||
ARG EASY_ADD_VERSION=0.8.18
|
||||
ADD ${GITHUB_BASEURL}/itzg/easy-add/releases/download/${EASY_ADD_VERSION}/easy-add_${TARGETOS}_${TARGETARCH}${TARGETVARIANT} /usr/bin/easy-add
|
||||
RUN chmod +x /usr/bin/easy-add
|
||||
|
||||
# renovate: datasource=github-releases packageName=itzg/restify
|
||||
ARG RESTIFY_VERSION=1.7.17
|
||||
ARG RESTIFY_VERSION=1.7.20
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${RESTIFY_VERSION} --var app=restify --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
# renovate: datasource=github-releases packageName=itzg/rcon-cli
|
||||
ARG RCON_CLI_VERSION=1.7.6
|
||||
ARG RCON_CLI_VERSION=1.7.8
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${RCON_CLI_VERSION} --var app=rcon-cli --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
# renovate: datasource=github-releases packageName=itzg/mc-monitor
|
||||
ARG MC_MONITOR_VERSION=0.17.0
|
||||
ARG MC_MONITOR_VERSION=1.18.3
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
# renovate: datasource=github-releases packageName=itzg/mc-server-runner
|
||||
ARG MC_SERVER_RUNNER_VERSION=1.15.1
|
||||
ARG MC_SERVER_RUNNER_VERSION=1.16.1
|
||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
|
||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||
|
||||
# renovate: datasource=github-releases packageName=itzg/mc-image-helper versioning=loose
|
||||
ARG MC_HELPER_VERSION=1.64.1
|
||||
ARG MC_HELPER_VERSION=1.74.0
|
||||
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
|
||||
# used for cache busting local copy of mc-image-helper
|
||||
ARG MC_HELPER_REV=1
|
||||
|
||||
@@ -28,7 +28,7 @@ apt-get install -y \
|
||||
zstd \
|
||||
lbzip2 \
|
||||
nfs-common \
|
||||
libpcap0.8 \
|
||||
'libpcap0.8*' \
|
||||
libnuma1 \
|
||||
libcap2-bin \
|
||||
jattach \
|
||||
|
||||
@@ -209,6 +209,22 @@ By default, the image finishes startup by exec'ing [mc-server-runner](https://gi
|
||||
> [!TIP]
|
||||
> The `SERVER_RUNNER` variable is expanded when passed to `exec` so that `mc-server-runner` can be wrapped by another executable that is mounted into the container.
|
||||
|
||||
## Pre-start script
|
||||
|
||||
To run something of your own after the image has finished setting up the server files and just before it starts the server, set `PRE_START_SCRIPT` to the path of an executable file that you have mounted into the container. The image runs it directly (not through a shell) and waits for it to finish. It runs as the user the server runs as, from the server's working directory, with the same environment the server gets. If it exits with a non-zero status, the container exits without starting the server.
|
||||
|
||||
For example, a script that waits for plugin jars that another process is still downloading:
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
PRE_START_SCRIPT: /hooks/wait-for-plugins
|
||||
volumes:
|
||||
- ./hooks:/hooks:ro
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
> The image does not guarantee that any particular command is available to the script, and it may change between image versions. Keeping the script working is up to you.
|
||||
|
||||
## Enable Flare Flags
|
||||
|
||||
To enable the JVM flags required to fully support the [Flare profiling suite](https://blog.airplane.gg/flare), set the following variable:
|
||||
|
||||
@@ -168,7 +168,9 @@ To [enforce the whitelist changes immediately](https://minecraft.wiki/w/Server.p
|
||||
|
||||
!!! tip "Changing user API provider"
|
||||
|
||||
The usernames provided for whitelist and ops processing are resolved using either [PlayerDB](https://playerdb.co/) or [Mojang's API](https://wiki.vg/Mojang_API#Username_to_UUID). The default uses PlayerDB, but can be changed by setting the environment variable `USER_API_PROVIDER` to "mojang". Sometimes one or the other service can become overloaded, which is why there is the ability to switch providers.
|
||||
When specifying usernames for whitelist and ops processing, use Minecraft: Java Edition profile names, not Xbox gamertags. They can differ even when they belong to the same Microsoft account. A player can review or change their Java profile name on the [Minecraft profile page](https://www.minecraft.net/en-us/msaprofile/mygames/editprofile).
|
||||
|
||||
Usernames are resolved using either [PlayerDB](https://playerdb.co/) or [Mojang's API](https://wiki.vg/Mojang_API#Username_to_UUID). The default uses PlayerDB, but can be changed by setting the environment variable `USER_API_PROVIDER` to "mojang". Sometimes one or the other service can become overloaded, which is why there is the ability to switch providers.
|
||||
|
||||
|
||||
### Op/Administrator Players
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
### Using the MASH playbook
|
||||
|
||||
[The MASH Playbook](https://github.com/mother-of-all-self-hosting/mash-playbook) is a premade playbook with the option to deploy a [wide variety of open-source services](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/supported-services.md) to your server(s), including [docker-minecraft-server](https://github.com/XHawk87/ansible-role-minecraft), making it a good option if you want all the bells and whistles alongside your Minecraft server.
|
||||
[The MASH Playbook](https://github.com/mother-of-all-self-hosting/mash-playbook) is a premade playbook with the option to deploy a [wide variety of open-source services](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/supported-services.md) to your server(s), including [docker-minecraft-server](https://github.com/mother-of-all-self-hosting/ansible-role-minecraft), making it a good option if you want all the bells and whistles alongside your Minecraft server.
|
||||
- Check out the [Installation Guide](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/README.md) for the MASH playbook to get started.
|
||||
- You can then enable [Minecraft](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/minecraft.md) in your vars.yml.
|
||||
- Enable any supporting services that you might find useful, such as [user authentication](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/authelia.md), [remote backups](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/backup-borg.md), [email relay](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/exim-relay.md), [cron monitoring](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/healthchecks.md), [audio and video conferencing](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/jitsi.md), databases ([MariaDB](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/mariadb.md), [PostgresSQL](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/postgres.md)), [push notifications](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/ntfy.md), [uptime monitoring](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/uptime-kuma.md), [a website](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/wordpress.md), as well as installing any [extra files, folders, applications, services and running commands](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/auxiliary.md) automatically on deployment.
|
||||
|
||||
@@ -29,3 +29,11 @@ A tool that is bundled with this image to provide complex, re-usable preparation
|
||||
### [itzg/rcon](https://github.com/itzg/docker-rcon-web-admin)
|
||||
|
||||
An image that dockerizes [rcon-web-admin](https://github.com/rcon-web-admin/rcon-web-admin).
|
||||
|
||||
### [AutoStopper](https://github.com/Criseda/AutoStopper)
|
||||
|
||||
A Velocity plugin that stops idle backend servers and wakes them when players connect, with readiness-aware Docker lifecycle management.
|
||||
|
||||
### [Kobblestone](https://github.com/kobblestoneio/kobblestone)
|
||||
|
||||
A Kubernetes operator for Minecraft that supports custom resource types to manage servers, routers, backups and more.
|
||||
@@ -4,9 +4,11 @@ Mods and plugins can be auto-downloaded and upgraded from CurseForge by setting
|
||||
|
||||
A specific file can be omitted from each reference to allow for auto-selecting the newest version of the selected mod/plugin. The resolved `VERSION` and `TYPE` will be taken into consideration for selecting the appropriate file.
|
||||
|
||||
When `TYPE` is `CLEANROOM`, `CURSEFORGE_FILES` uses the Forge loader context to select compatible files. This only affects CurseForge file resolution; the server still runs with Cleanroom.
|
||||
|
||||
!!! info "CurseForge API key usage"
|
||||
|
||||
A CurseForge API key is _now_ included by this image; however, you can always supply your own instead. A CurseForge API key can be allocated and set with `CF_API_KEY` (or `CF_API_KEY_FILE`) [as described here](../types-and-platforms/mod-platforms/auto-curseforge.md#api-key).
|
||||
A CurseForge API key is _now_ included by this image on Java 17 and newer; however, you can always supply your own instead. A CurseForge API key can be allocated and set with `CF_API_KEY` (or `CF_API_KEY_FILE`) [as described here](../types-and-platforms/mod-platforms/auto-curseforge.md#api-key). The `java8` image (and other pre-Java 17 tags) does not include a baked-in key; set `CF_API_KEY` yourself.
|
||||
|
||||
## Project-file references
|
||||
|
||||
|
||||
@@ -66,6 +66,8 @@ You can also specify the `REMOVE_OLD_MODS_DEPTH` (default is 16) variable to onl
|
||||
|
||||
For example: `-e REMOVE_OLD_MODS=TRUE -e REMOVE_OLD_MODS_INCLUDE="*.jar" -e REMOVE_OLD_MODS_DEPTH=1` will remove all old jar files that are directly inside the `plugins/` or `mods/` directory.
|
||||
|
||||
To remove all files in the `/data/config` directory before a modpack is downloaded and unpacked, set `REMOVE_OLD_CONFIGS=TRUE`. This is useful when a modpack update would otherwise override locally customized configuration files. The removal process can be fine tuned with `REMOVE_OLD_CONFIGS_INCLUDE` and `REMOVE_OLD_CONFIGS_EXCLUDE` (comma separated lists of file glob patterns, defaults to `*` so everything is removed) and `REMOVE_OLD_CONFIGS_DEPTH` (default 16). The target directory can be changed with `CONFIG_OUT_DIR` (default `/data/config`).
|
||||
|
||||
These paths work well if you want to have a common set of modules in a separate location, but still have multiple worlds with different server requirements in either persistent volumes or a downloadable archive.
|
||||
|
||||
!!! information "Multiple source directories"
|
||||
|
||||
@@ -22,7 +22,8 @@ Where:
|
||||
|
||||
- **Project** is the project slug or ID, see below
|
||||
- **Version** is the version ID (such as "Oa9ZDzZq") or number (such as "2.21.2"). When omitted, the latest release version will be selected. Using version ID will override Minecraft and loader compatibility checks.
|
||||
- **Release Type** is `release`, `beta`, or `alpha` indicating the latest version to select.
|
||||
- **Release Type** is `release`, `beta`, or `alpha` indicating the latest version to select. By default, the newest version that is the same or better release type is selected.
|
||||
A `+` suffix can be used to indicate instead that the most "stable" version is selected.
|
||||
- **Prefix** is `datapack`, `fabric`, `forge`, or `paper`
|
||||
- The `datapack` prefix is optional when running a vanilla server
|
||||
- The `fabric`, `forge`, and `paper` prefixes allow for installing mods/plugins that differ from server's `TYPE`. Using [Sinytra Connector](https://modrinth.com/mod/connector) is an example of this, where Fabric mods can be loaded into a NeoForge server.
|
||||
@@ -46,18 +47,22 @@ Where:
|
||||
|
||||

|
||||
|
||||
### Examples
|
||||
|
||||
| Description | Example projects entry |
|
||||
|---------------------------------|-------------------------------------------------------|
|
||||
| Select latest version | `fabric-api` |
|
||||
| Select specific version | `fabric-api:bQZpGIz0`<br/>`fabric-api:0.119.2+1.21.4` |
|
||||
| Select latest beta version | `fabric-api:beta` |
|
||||
| Latest version using project ID | `P7dR8mSH` |
|
||||
| Latest version of datapack | `datapack:terralith` |
|
||||
| Specific version of datapack | `datapack:terralith:2.5.5` |
|
||||
| Mod loader override | `fabric:fabric-api`<br/>`fabric:fabric-api:bQZpGIz0` |
|
||||
| Projects Listing File | `@/path/to/modrinth-mods.txt` |
|
||||
!!! tip "Most stable release type"
|
||||
|
||||
As an example of using the `{release type}+` feature, [Concurrent Chunk Management for 1.12.11](https://modrinth.com/mod/c2me-fabric/versions?g=1.21.11) had a "release" version at "0.3.6.0.0" and then started publishing "alpha"s with "0.3.7+alpha.0.6+1.21.11". Using `c2me-fabric:alpha+` indicates that the newest "stable" is actually preferred, which is "0.3.6.0.0".
|
||||
|
||||
### Examples
|
||||
|
||||
| Description | Example projects entry |
|
||||
|---------------------------------|-------------------------------------------------------|
|
||||
| Select latest version | `fabric-api` |
|
||||
| Select specific version | `fabric-api:bQZpGIz0`<br/>`fabric-api:0.119.2+1.21.4` |
|
||||
| Select latest beta version | `fabric-api:beta` |
|
||||
| Latest version using project ID | `P7dR8mSH` |
|
||||
| Latest version of datapack | `datapack:terralith` |
|
||||
| Specific version of datapack | `datapack:terralith:2.5.5` |
|
||||
| Mod loader override | `fabric:fabric-api`<br/>`fabric:fabric-api:bQZpGIz0` |
|
||||
| Projects Listing File | `@/path/to/modrinth-mods.txt` |
|
||||
|
||||
### Notes
|
||||
|
||||
|
||||
+12
-12
@@ -1,25 +1,25 @@
|
||||
click==8.4.2
|
||||
click==8.5.0
|
||||
colorama==0.4.6
|
||||
deepmerge==2.1.0
|
||||
deepmerge==3.0.1
|
||||
ghp-import==2.1.0
|
||||
griffe==2.1.0
|
||||
griffe==2.3.2
|
||||
Jinja2==3.1.6
|
||||
Markdown==3.10.2
|
||||
MarkupSafe==3.0.3
|
||||
Markdown==3.11
|
||||
MarkupSafe==3.0.4
|
||||
mergedeep==1.3.4
|
||||
mkdocs==1.6.1
|
||||
mkdocs-autorefs==1.4.4
|
||||
mkdocs-get-deps==0.2.2
|
||||
mkdocstrings==1.0.6
|
||||
mkdocstrings-python==2.0.5
|
||||
packaging==26.2
|
||||
mkdocstrings==1.0.7
|
||||
mkdocstrings-python==2.0.9
|
||||
packaging==26.3
|
||||
pathspec==1.1.1
|
||||
platformdirs==4.11.0
|
||||
Pygments==2.20.0
|
||||
pymdown-extensions==11.0.1
|
||||
platformdirs==4.13.0
|
||||
Pygments==2.21.0
|
||||
pymdown-extensions==12.2
|
||||
python-dateutil==2.9.0.post0
|
||||
PyYAML==6.0.3
|
||||
pyyaml_env_tag==1.1
|
||||
six==1.17.0
|
||||
watchdog==6.0.0
|
||||
zensical==0.0.51
|
||||
zensical==0.0.69
|
||||
@@ -6,7 +6,9 @@ To manage a CurseForge modpack automatically with upgrade support, pinned or lat
|
||||
|
||||
!!! info "CurseForge API key usage"
|
||||
|
||||
A CurseForge API key is _now_ included by this image; however, you can always supply your own instead. Go to their [developer console](https://console.curseforge.com/), generate an API key, and set the environment variable `CF_API_KEY`.
|
||||
A CurseForge API key is _now_ included by this image on Java 17 and newer; however, you can always supply your own instead. Go to their [developer console](https://console.curseforge.com/), generate an API key, and set the environment variable `CF_API_KEY`.
|
||||
|
||||
The `java8` image (and other pre-Java 17 tags) does **not** include that key. Set `CF_API_KEY` yourself, or install the pack on a Java 17+ image first. See [Java 8](../../versions/java.md#java-8).
|
||||
|
||||
When entering your API Key in a docker compose file you will need to escape any `$` character with a second `$`. Refer to [this compose file reference section](https://docs.docker.com/compose/compose-file/compose-file-v3/#variable-substitution) for more information.
|
||||
|
||||
@@ -109,7 +111,7 @@ The latest modpack file and its associated mod loader will be located and instal
|
||||
|
||||
- Use `CF_PAGE_URL`, but include the full URL to a specific file
|
||||
- Set `CF_FILE_ID` to the numerical file ID
|
||||
- Specify a substring to match the desired filename with `CF_FILENAME_MATCHER`
|
||||
- Specify either a substring or a regex pattern surrounded with "/" to match the desired filename with `CF_FILENAME_MATCHER`
|
||||
|
||||
The following shows where to get the URL to the specific file and also shows where the file ID is located:
|
||||
|
||||
@@ -131,6 +133,21 @@ The following examples all refer to version 1.0.7 of ATM8:
|
||||
CF_FILENAME_MATCHER: 1.0.7
|
||||
```
|
||||
|
||||
To use a regular expression instead, surround the pattern with `/` characters:
|
||||
|
||||
```yaml
|
||||
# Matches filenames containing a 1.0.7 version
|
||||
CF_SLUG: all-the-mods-8
|
||||
CF_FILENAME_MATCHER: '/1\.0\.7/'
|
||||
```
|
||||
|
||||
Regular expressions can use `^` to anchor a match to the beginning of the filename and `$` to anchor it to the end. The following matches an ATM8 filename that starts with `all-the-mods-8` and ends with `1.0.7.zip`:
|
||||
|
||||
```yaml
|
||||
CF_SLUG: all-the-mods-8
|
||||
CF_FILENAME_MATCHER: '/^All the Mods 8-1\.0\.7\.zip$/'
|
||||
```
|
||||
|
||||
Pinning modpack version also pins the mod loader (to the version specified by the modpack). Mod loader version cannot be pinned independently of the modpack.
|
||||
|
||||
### Custom modloader versions
|
||||
@@ -267,6 +284,8 @@ If needing to iterate on the options above, set `CF_FORCE_SYNCHRONIZE` to "true"
|
||||
|
||||
Modpack zip files typically include an `overrides` subdirectory that may contain config files, world data, and extra mod files. All of those files will be extracted into the `/data` path of the container. If any of those files, such as incompatible mods, need to be excluded from extraction, then the `CF_OVERRIDES_EXCLUSIONS` variable can be set with a comma or newline delimited list of ant-style paths ([see below](#ant-style-paths)) to exclude, relative to the overrides (or `/data`) directory.
|
||||
|
||||
The exclude/include file can also declare `overridesExclusions` for a specific modpack. These ant-style paths are combined with `CF_OVERRIDES_EXCLUSIONS`. Project exclusions such as `CF_EXCLUDE_MODS` do not filter files bundled in overrides. Set `CF_FORCE_SYNCHRONIZE=true` to reapply changed exclusions to an existing installation.
|
||||
|
||||
### Ant-style paths
|
||||
|
||||
Ant-style paths can include the following globbing/wildcard symbols:
|
||||
|
||||
@@ -53,6 +53,15 @@ With java 17+ the server starts with `-Dfml.readTimeout=180 @java9args.txt -jar
|
||||
|
||||
With java 8 the server stars with `-XX:+UseStringDeduplication -XX:+UseCompressedOops -XX:+UseCodeCacheFlushing -Dfml.readTimeout=180 -jar forge-1.7.10-10.13.4.1614-1.7.10-universal.jar`
|
||||
|
||||
## FML query prompt
|
||||
|
||||
When Forge pauses startup and prompts for confirmation, it is usually because it detected missing registry entries. That likely means mods have been removed, disabled, or updated in a way that deleted blocks, items, entities, or fluids that currently exist in your world files. If in doubt, you should reach out to the GTNH team to determine why an upgrade from/to particular versions resulted in this outcome.
|
||||
|
||||
In order to automatically confirm the prompt, you can add "-Dfml.queryResult=confirm" to the `JVM_OPTS` environment variable.
|
||||
|
||||
> [!WARNING]
|
||||
> If you confirm the prompt, Forge will scan your world file and permanently delete every block, item, chunk-loaded entity, or fluid belonging to the missing mod.
|
||||
|
||||
## Developer Versions
|
||||
|
||||
To run the nightly developer builds of GTNH, set the environment variable `GTNH_USE_DAILY_BUILD` to true and set `GTNH_PACK_VERSION` either to `latest` or a specific run ID of the build workflow. The run ID can be found in the [GTNH GitHub Actions](https://github.com/GTNewHorizons/DreamAssemblerXXL/actions) page of the DreamAssemblerXXL repository. The run ID is the number in the URL of the workflow run, for example `123456789`.
|
||||
|
||||
@@ -50,7 +50,7 @@ Some mods, such as [MCInstance Loader](https://modrinth.com/mod/mcinstance-loade
|
||||
|
||||
## Excluding files
|
||||
|
||||
To exclude client mods that are incorrectly declared by the modpack as server-compatible, set `MODRINTH_EXCLUDE_FILES` to a comma or newline delimited list of partial file names to exclude. You may need to set `MODRINTH_FORCE_SYNCHRONIZE` to "true" while iterating on a compatible set of mods to use.
|
||||
To exclude client mods that are incorrectly declared by the modpack as server-compatible, set `MODRINTH_EXCLUDE_FILES` to a comma or newline delimited list of file name matchers. Each entry is a case-insensitive substring of the file path, or a regular expression if surrounded with `/` (same convention as [`CF_FILENAME_MATCHER`](auto-curseforge.md#pinning-modpack-and-mod-loader-versions)). You may need to set `MODRINTH_FORCE_SYNCHRONIZE` to "true" while iterating on a compatible set of mods to use.
|
||||
|
||||
!!! example
|
||||
|
||||
@@ -64,7 +64,7 @@ To exclude client mods that are incorrectly declared by the modpack as server-co
|
||||
|
||||
## Force-include files
|
||||
|
||||
To force include client mods, set `MODRINTH_FORCE_INCLUDE_FILES` to a comma or newline delimited list of partial file names. You may need to set `MODRINTH_FORCE_SYNCHRONIZE` to "true" while iterating on a compatible set of mods to use.
|
||||
To force include client mods, set `MODRINTH_FORCE_INCLUDE_FILES` to a comma or newline delimited list of file name matchers using the same substring or `/regex/` rules as `MODRINTH_EXCLUDE_FILES`. You may need to set `MODRINTH_FORCE_SYNCHRONIZE` to "true" while iterating on a compatible set of mods to use.
|
||||
|
||||
!!! example
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
A [Cleanroom server](https://cleanroommc.com/) can be automatically downloaded, upgraded, and run by setting the environment variable `TYPE` to "CLEANROOM".
|
||||
|
||||
!!! example
|
||||
|
||||
```shell
|
||||
docker run -e TYPE=CLEANROOM ...
|
||||
```
|
||||
|
||||
or in a compose file
|
||||
```yaml
|
||||
environment:
|
||||
TYPE: CLEANROOM
|
||||
```
|
||||
|
||||
Cleanroom is a loader specifically for Minecraft 1.12.2, so `VERSION` will be ignored. By default, the latest version of Cleanroom will be selected. You can also choose a specific Cleanroom version by setting `CLEANROOM_LOADER_VERSION` with that version, such as "0.7.0".
|
||||
|
||||
!!! example
|
||||
|
||||
```shell
|
||||
docker run -e TYPE=CLEANROOM -e CLEANROOM_LOADER_VERSION=0.7.0 ...
|
||||
```
|
||||
|
||||
or in a compose file
|
||||
```yaml
|
||||
environment:
|
||||
TYPE: CLEANROOM
|
||||
CLEANROOM_LOADER_VERSION: "0.7.0"
|
||||
```
|
||||
|
||||
By default, the latest version of the installer will be selected. You can instead choose a specific installer version by setting `CLEANROOM_INSTALLER_VERSION`, such as "0.2.0".
|
||||
|
||||
!!! example
|
||||
|
||||
```shell
|
||||
docker run -e TYPE=CLEANROOM -e CLEANROOM_INSTALLER_VERSION=0.2.0 ...
|
||||
```
|
||||
|
||||
or in a compose file
|
||||
```yaml
|
||||
environment:
|
||||
TYPE: CLEANROOM
|
||||
CLEANROOM_INSTALLER_VERSION: "0.2.0"
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
You do not need to setup this unless required. The installer come from Cleanroom support multi-version installation compare to legacy installer.
|
||||
|
||||
To use a pre-downloaded Cleanroom installer, place it in a location mounted into the container and specify the container path with `CLEANROOM_FROM_FILE`. To download a Cleanroom installer from a custom location, such as your own file repository, specify the URL with `CLEANROOM_FROM_URL`.
|
||||
|
||||
In both of the cases above, there is no need for the `CLEANROOM_LOADER_VERSION` or `CLEANROOM_INSTALLER_VERSION` variables.
|
||||
|
||||
!!! note
|
||||
|
||||
A legacy installer is supported as-is, but issues will not be addressed.
|
||||
|
||||
!!! note
|
||||
|
||||
If an error occurs while installing Cleanroom, it might be possible to resolve by temporarily setting `CLEANROOM_FORCE_REINSTALL` to "true". Be sure to remove that variable after successfully starting the server.
|
||||
|
||||
Specified installer version is configurable via environment variables:
|
||||
|
||||
- `CLEANROOM_INSTALLER_VERSION`: used to specific installer version, default is latest
|
||||
|
||||
URLs configurable via environment variables:
|
||||
|
||||
- `CLEANROOM_MAVEN_URL`: default is https://maven.cleanroommc.com
|
||||
@@ -87,4 +87,24 @@ Support for [NeoForge](https://neoforged.net/) is also provided. A NeoForge serv
|
||||
FORGE_INSTALLER_URL: https://github.com/CleanroomMC/Cleanroom/releases/download/0.2.4-alpha/cleanroom-0.2.4-alpha-installer.jar
|
||||
```
|
||||
|
||||
[Full example](https://github.com/itzg/docker-minecraft-server/tree/master/examples/cleanroom)
|
||||
[Full example](https://github.com/itzg/docker-minecraft-server/tree/master/examples/cleanroom)
|
||||
|
||||
#### Apply Cleanroom
|
||||
|
||||
As an alternative to replacing the `TYPE` as "cleanroom", you can use any of the Forge-like types above, including `AUTO_CURSEFORGE` described [here](../mod-platforms/auto-curseforge.md), and apply Cleanroom as the loader by setting the environment variable `APPLY_CLEANROOM` to "true".
|
||||
|
||||
All the configuration options described above can be used with this.
|
||||
|
||||
!!! warning
|
||||
|
||||
As mentioned above, Cleanroom **only works with 1.12.2**, so be sure to utilize modpacks and mods that are compatible with 1.12.2. If using a `TYPE` of "forge" or "neoforge", be sure to set `VERSION` to "1.12.2".
|
||||
|
||||
!!! example
|
||||
|
||||
```yaml
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: AUTO_CURSEFORGE
|
||||
CF_PAGE_URL: https://www.curseforge.com/minecraft/modpacks/enigmatica2expert/files/9088147
|
||||
APPLY_CLEANROOM: true
|
||||
```
|
||||
@@ -35,6 +35,8 @@ There are limited base versions supported, so you will also need to set `VERSIO
|
||||
Available Ketting Versions may be found at [https://reposilite.c0d3m4513r.com/#/Ketting-Server-Releases/org/kettingpowered/server/forge](https://reposilite.c0d3m4513r.com/#/Ketting-Server-Releases/org/kettingpowered/server/forge).
|
||||
The Version structure is `MinecraftVersion-ForgeVersion-KettingVersion` (e.g. `1.20.1-47.2.20-0.1.4` is for Minecraft `1.20.1`, Forge `47.2.20` and Ketting `0.1.4`).
|
||||
|
||||
The launcher itself defaults to the latest release; set `KETTING_RELEASE` to a [specific release](https://github.com/kettingpowered/kettinglauncher/releases) tag, such as `v1.5.1`, to download that one instead.
|
||||
|
||||
### Mohist
|
||||
|
||||
A [Mohist](https://github.com/MohistMC/Mohist) server can be used with
|
||||
@@ -83,3 +85,5 @@ A [Arclight](https://arclight.izzel.io/) type server can be used with
|
||||
|
||||
-e TYPE=ARCLIGHT
|
||||
-e ARCLIGHT_TYPE=NEOFORGE,FORGE,FABRIC
|
||||
|
||||
By default the latest release is used; set `ARCLIGHT_RELEASE` to a [specific release](https://github.com/IzzelAliz/Arclight/releases) tag, such as `FeudalKings/1.0.1`, to run that one instead. A `VERSION` is still required to select the matching jar within the release.
|
||||
@@ -47,6 +47,28 @@ Note: it is a fork of the original [NanoLimbo](https://github.com/Nan1t/NanoLimb
|
||||
|
||||
An alternate Limbo server
|
||||
|
||||
Configuration options with defaults:
|
||||
|
||||
- `NANOLIMBO_RELEASE`=latest
|
||||
|
||||
The [NanoLimbo release](https://github.com/BoomEaro/NanoLimbo/releases) to download the server jar from, such as `1.13.0`.
|
||||
|
||||
## Poseidon
|
||||
|
||||
A [Poseidon](https://github.com/retromcorg/Project-Poseidon) server can be run by setting `TYPE` to `POSEIDON`.
|
||||
|
||||
Poseidon is only available for b1.7.3, so be sure to set `VERSION=b1.7.3`.
|
||||
|
||||
Configuration options with defaults:
|
||||
|
||||
- `POSEIDON_RELEASE`=latest
|
||||
|
||||
The [Poseidon release](https://github.com/retromcorg/Project-Poseidon/releases) to download, such as `1.1.12-260720-1033-5303bd5`.
|
||||
|
||||
- `POSEIDON_TYPE`=poseidon
|
||||
|
||||
Set to `uberbukkit` to use the [uberbukkit](https://github.com/Moresteck/uberbukkit) fork instead, whose releases are also selectable with `POSEIDON_RELEASE`.
|
||||
|
||||
## Crucible
|
||||
|
||||
A [Crucible](https://github.com/CrucibleMC/Crucible) server can be run by setting `TYPE` to `CRUCIBLE`.
|
||||
@@ -55,6 +77,8 @@ Configuration options with defaults:
|
||||
|
||||
- `CRUCIBLE_RELEASE`=latest
|
||||
|
||||
The [Crucible release](https://github.com/CrucibleMC/Crucible/releases) to run, such as `v5.4`. Since `latest` only tracks full releases, a pre-release such as a `staging-*` tag has to be named explicitly.
|
||||
|
||||
Crucible is only available for 1.7.10, so be sure to set `VERSION=1.7.10`.
|
||||
|
||||
## Custom
|
||||
@@ -74,3 +98,74 @@ Alternatively, the final `-jar` invocation can be replaced by setting `CUSTOM_JA
|
||||
When using `docker run` make sure to quote the entire value since it has spaces in it, such as
|
||||
|
||||
-e CUSTOM_JAR_EXEC="-cp worldedit.jar:Carpet-Server.jar net.minecraft.server.MinecraftServer"
|
||||
|
||||
## Pumpkin
|
||||
|
||||
A [Pumpkin](https://pumpkinmc.org/) server can be run by setting `TYPE` to `PUMPKIN`.
|
||||
|
||||
Pumpkin is a Minecraft server written in Rust and is shipped as a single native executable instead of a Java jar. The image downloads the asset matching its architecture from the [latest release](https://github.com/Pumpkin-MC/Pumpkin/releases), so `VERSION` and the JVM memory and tuning variables do not apply. Set `PUMPKIN_RELEASE` to run a different release.
|
||||
|
||||
```shell
|
||||
docker run -d --pull=always -v /path/on/host:/data \
|
||||
-p 25565:25565 -p 19132:19132/udp -e EULA=TRUE -e TYPE=PUMPKIN \
|
||||
--name mc itzg/minecraft-server
|
||||
```
|
||||
|
||||
Configuration options with defaults:
|
||||
|
||||
- `FORCE_REDOWNLOAD`=false
|
||||
|
||||
Set to true to re-download the executable.
|
||||
|
||||
- `PUMPKIN_RELEASE`=latest
|
||||
|
||||
The [Pumpkin release](https://github.com/Pumpkin-MC/Pumpkin/releases) to run, such as `0.2.0+26.3-26.51`, or a moving prerelease channel like `nightly` or `canary`. `VERSION` selects the Minecraft version for other server types, so it is ignored here.
|
||||
|
||||
Each release is downloaded to `/data/pumpkin-<arch>-Linux`, and switching `PUMPKIN_RELEASE` replaces that executable. Set `FORCE_REDOWNLOAD=true` to re-download the selected release, which is useful to pick up a newer `nightly` or `canary` build.
|
||||
|
||||
Pumpkin is configured through `/data/pumpkin.toml`. The image creates that file on the first run and updates the settings below at each startup, leaving the remaining options in your file alone. Anything without a matching environment variable can be set by editing `pumpkin.toml` directly.
|
||||
|
||||
| Variable | Pumpkin setting |
|
||||
| :-------------------------------------------------- | :--------------------------------------------------------------------------------- |
|
||||
| `MOTD` | `networking.java.motd` and `networking.bedrock.motd` |
|
||||
| `MAX_PLAYERS` | `networking.java.max_players` and `networking.bedrock.max_players` |
|
||||
| `ONLINE_MODE` | `networking.java.online_mode` and `networking.bedrock.online_mode` |
|
||||
| `SERVER_PORT` | `networking.java.address` |
|
||||
| `VIEW_DISTANCE` | `networking.java.view_distance` and `networking.bedrock.view_distance` |
|
||||
| `SIMULATION_DISTANCE` | `networking.java.simulation_distance` and `networking.bedrock.simulation_distance` |
|
||||
| `LEVEL` | `default_level_name` |
|
||||
| `SEED` | `seed` |
|
||||
| `MODE` | `default_gamemode` |
|
||||
| `DIFFICULTY` | `default_difficulty` |
|
||||
| `HARDCORE` | `hardcore` |
|
||||
| `ALLOW_NETHER` | `allow_nether` |
|
||||
| `FORCE_GAMEMODE` | `force_gamemode` |
|
||||
| `PVP` | `pvp.enabled` |
|
||||
| `OP_PERMISSION_LEVEL` | `op_permission_level` |
|
||||
| `SPAWN_PROTECTION` | `spawn_protection` |
|
||||
| `ACCEPTS_TRANSFERS` | `accepts_transfers` |
|
||||
| `WHITELIST`, `WHITELIST_FILE` or `ENABLE_WHITELIST` | `white_list` |
|
||||
| `ENFORCE_WHITELIST` | `enforce_whitelist` |
|
||||
| `ENABLE_RCON` | `networking.rcon.enabled` |
|
||||
| `RCON_PORT` | `networking.rcon.address` |
|
||||
| `RCON_PASSWORD` | `networking.rcon.password` |
|
||||
| `ENABLE_QUERY` | `networking.query.enabled` |
|
||||
| `QUERY_PORT` | `networking.query.address` |
|
||||
| `PREVENT_PROXY_CONNECTIONS` | `networking.java.authentication.prevent_proxy_connections` |
|
||||
| `RESOURCE_PACK` | `resource_pack.java.url` and `resource_pack.java.enabled` |
|
||||
| `RESOURCE_PACK_SHA1` | `resource_pack.java.sha1` |
|
||||
| `RESOURCE_PACK_PROMPT` | `resource_pack.java.prompt_message` |
|
||||
| `RESOURCE_PACK_ENFORCE` | `resource_pack.java.force` |
|
||||
| `LOG_LEVEL` | `logging.level` |
|
||||
|
||||
!!! note
|
||||
|
||||
The first run adds every option Pumpkin knows about to `pumpkin.toml`, since Pumpkin fills in its own defaults for the settings the image does not manage.
|
||||
|
||||
!!! note
|
||||
|
||||
Bedrock Edition players join on UDP port `19132`, which Pumpkin serves itself from the same world. That port has to be published, such as with `-p 19132:19132/udp`, since the image only declares `25565` with `EXPOSE`. See [examples/pumpkin](https://github.com/itzg/docker-minecraft-server/tree/master/examples/pumpkin) for a complete compose file.
|
||||
|
||||
!!! note
|
||||
|
||||
Pumpkin is under heavy development, as the project itself states, so configuration and world formats can change between releases. Run it on a test server and keep backups.
|
||||
+13
-1
@@ -204,6 +204,12 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
<td><code>easy</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>HARDCORE</code></td>
|
||||
<td>Enable hardcore mode. Set to <code>true</code> or <code>false</code>. This maps to the Minecraft server property <code>hardcore</code>.</td>
|
||||
<td><code>false</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>ICON</code></td>
|
||||
<td>The url or file path for the icon image to use for the server. It will be downloaded, scaled, and converted to the proper format.</td>
|
||||
@@ -282,6 +288,12 @@ alternatively, you can mount: <code>/etc/localtime:/etc/localtime:ro
|
||||
<td><code>false</code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>PRE_START_SCRIPT</code></td>
|
||||
<td>Path to an executable run after setup and just before the server starts. The server is not started if it exits non-zero. See <a href="../configuration/misc-options/#pre-start-script">Pre-start script</a></td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>USE_FLARE_FLAGS</code></td>
|
||||
<td>To enable the JVM flags required to fully support the <a href="https://blog.airplane.gg/flare">Flare profiling suite</a>.</td>
|
||||
@@ -611,7 +623,7 @@ This image maps known server properties as described in [this section](configura
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>CF_FILENAME_MATCHER</code></td>
|
||||
<td>Specify a substring to match the desired filename</td>
|
||||
<td>Specify either a substring or a regex pattern surrounded with "/" to match the desired filename</td>
|
||||
<td><code></code></td>
|
||||
<td>⬜️</td>
|
||||
</tr>
|
||||
|
||||
@@ -111,7 +111,11 @@ Caused by: org.spongepowered.asm.mixin.throwables.ClassMetadataNotFoundException
|
||||
|
||||
#### Java 8
|
||||
|
||||
For Forge versions less than 1.18, you _must_ use the `java8-multiarch` (or other java8) image tag.
|
||||
For Forge versions less than 1.18, you _must_ use the `java8` (or other java8) image tag.
|
||||
|
||||
!!! warning "Java 8 is in maintenance mode"
|
||||
|
||||
The `java8` / `java8-jdk` tags, and other pre-Java 17 tags (`java11`, `java16`), pin an older `mc-image-helper` that predates the baked-in CurseForge API key. `AUTO_CURSEFORGE` and `CURSEFORGE_FILES` on those images require you to set `CF_API_KEY` yourself. Java 17+ images include a key and do not need this.
|
||||
|
||||
In general, if you see the following line in a server startup failure, then it means you need to be using Java 8 instead of the latest image Java version:
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
cf-api-key*
|
||||
@@ -0,0 +1,34 @@
|
||||
name: atm10-with-secret-file
|
||||
|
||||
secrets:
|
||||
cf-api-key:
|
||||
file: ./cf-api-key.txt
|
||||
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
EULA: true
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
CF_SLUG: all-the-mods-10
|
||||
# Optional: select a specific version/file
|
||||
# CF_FILENAME_MATCHER: "1.17"
|
||||
CF_API_KEY_FILE: /run/secrets/cf-api-key
|
||||
DEBUG: true
|
||||
MEMORY: 4G
|
||||
CF_OVERRIDES_EXCLUSIONS: |
|
||||
# Not applicable for server side
|
||||
shaderpacks/**
|
||||
secrets:
|
||||
- cf-api-key
|
||||
volumes:
|
||||
# Use managed volume by default, but can change to a relative path like
|
||||
# ./data:/data
|
||||
# to use a host directory
|
||||
- mc-data:/data
|
||||
volumes:
|
||||
mc-data:
|
||||
@@ -8,10 +8,13 @@ services:
|
||||
environment:
|
||||
EULA: true
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
# Verified up to ATM10 8.1
|
||||
CF_SLUG: all-the-mods-10
|
||||
# Optional: select a specific version/file
|
||||
# CF_FILENAME_MATCHER: "1.17"
|
||||
MEMORY: 4G
|
||||
CF_IGNORE_MISSING_FILES: |
|
||||
config/ftbquests/quests/reward_tables/*.snbt
|
||||
CF_OVERRIDES_EXCLUSIONS: |
|
||||
# Not applicable for server side
|
||||
shaderpacks/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
image: itzg/minecraft-server:java8
|
||||
ports:
|
||||
- "25565:25565"
|
||||
environment:
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
name: po3-from-zip-file
|
||||
|
||||
services:
|
||||
minecraft:
|
||||
stop_grace_period: 20s
|
||||
image: itzg/minecraft-server:java8
|
||||
container_name: po3
|
||||
tty: true
|
||||
stdin_open: true
|
||||
# Can change to a relative path like
|
||||
# ./server-files:/data
|
||||
# to use a host directory
|
||||
volumes:
|
||||
- ./downloads:/downloads
|
||||
- ./server:/data
|
||||
# Uses managed volume by default
|
||||
#- mc-data:/data
|
||||
ports:
|
||||
- "25565:25565"
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
EULA: true
|
||||
MOD_PLATFORM: AUTO_CURSEFORGE
|
||||
CF_MODPACK_ZIP: "/downloads/modpacks/PO3-3.5.0.zip"
|
||||
CF_SLUG: "custom"
|
||||
# Mod needed for this pack
|
||||
CF_FORCE_INCLUDE_MODS: hwyla
|
||||
CF_API_KEY: $XX$XX$X.XXXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
MEMORY: 8G
|
||||
OVERRIDE_SERVER_PROPERTIES: true
|
||||
LEVEL_TYPE: botania-skyblock
|
||||
|
||||
# Managed volume by default
|
||||
#volumes:
|
||||
#mc-data:
|
||||
@@ -3,13 +3,30 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
environment:
|
||||
EULA: true
|
||||
TYPE: FORGE
|
||||
FORGE_INSTALLER_URL: https://github.com/CleanroomMC/Cleanroom/releases/download/0.2.4-alpha/cleanroom-0.2.4-alpha-installer.jar
|
||||
ports:
|
||||
# expose the Minecraft server port outside of container
|
||||
- "25565:25565"
|
||||
environment:
|
||||
# REQUIRED for all types
|
||||
EULA: "TRUE"
|
||||
|
||||
# Set server type (vs the default of vanilla)
|
||||
TYPE: CLEANROOM
|
||||
DEBUG: "true"
|
||||
|
||||
# Optional (check doc for usage)
|
||||
# CLEANROOM_LOADER_VERSION: 0.0.0-alpha
|
||||
# CLEANROOM_INSTALLER_VERSION: 0.1.4
|
||||
# Using either follow env will ignore 2 above
|
||||
# CLEANROOM_FROM_LOCAL: ./installer.jar
|
||||
# CLEANROOM_FROM_URL: https://
|
||||
volumes:
|
||||
# use a named, managed volume for data volume
|
||||
- mc-data:/data
|
||||
# attach local host directory "mods" in same directory as this compose file
|
||||
# all mods in this directory get copied into /data/mods at startup
|
||||
- ./mods:/mods:ro
|
||||
|
||||
volumes:
|
||||
mc-data:
|
||||
# declared the named volume, but use default/local storage engine
|
||||
mc-data: {}
|
||||
@@ -1,7 +1,7 @@
|
||||
services:
|
||||
mc:
|
||||
# make sure this java version matches with pack java version
|
||||
image: itzg/minecraft-server:java25
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
ports:
|
||||
@@ -9,7 +9,7 @@ services:
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
TYPE: GTNH
|
||||
GTNH_PACK_VERSION: "2.8.1"
|
||||
GTNH_PACK_VERSION: "2.8.4"
|
||||
# Enable to delete old config backups
|
||||
# GTNH_DELETE_BACKUPS: true
|
||||
# Use to prevent updates
|
||||
|
||||
@@ -5,6 +5,8 @@ services:
|
||||
EULA: true
|
||||
TYPE: KETTING
|
||||
VERSION: 1.20.1
|
||||
# Optionally pin a specific Ketting launcher release instead of the latest
|
||||
# KETTING_RELEASE: "v1.5.1"
|
||||
CURSEFORGE_FILES: https://www.curseforge.com/minecraft/mc-mods/aquaculture
|
||||
ports:
|
||||
- "25565:25565"
|
||||
@@ -37,6 +37,8 @@ ln -s ${XDG_CONFIG_HOME}/containers/systemd/mc@.service ${XDG_CONFIG_HOME}/conta
|
||||
|
||||
If running rootless, be sure to enable lingering with `sudo loginctl enable-linger $USER`.
|
||||
|
||||
`GroupAdd=0` when rootless the equivalent of the user's group id, not the hosts root.
|
||||
|
||||
Also note that source IPs are currently lost due to how rootless podman handles custom networks.
|
||||
This should be fixed in a future podman release.[^3]
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ Image=docker.io/itzg/mc-router
|
||||
ContainerName=%N
|
||||
AutoUpdate=registry
|
||||
UserNS=host
|
||||
GroupAdd=0
|
||||
Volume=%t/podman/podman.sock:/var/run/docker.sock:ro
|
||||
Network=minecraft.network
|
||||
PublishPort=25565:25565
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server
|
||||
tty: true
|
||||
stdin_open: true
|
||||
environment:
|
||||
EULA: "true"
|
||||
TYPE: PUMPKIN
|
||||
# Optionally pin a specific Pumpkin release instead of the latest
|
||||
# PUMPKIN_RELEASE: "0.2.0+26.3-26.51"
|
||||
ports:
|
||||
- "25565:25565"
|
||||
- "19132:19132/udp"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
restart: unless-stopped
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
image: itzg/minecraft-server:java8
|
||||
environment:
|
||||
EULA: true
|
||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
mc:
|
||||
image: itzg/minecraft-server:java8-multiarch
|
||||
image: itzg/minecraft-server:java8
|
||||
volumes:
|
||||
- data:/data
|
||||
- ./modpacks:/modpacks:ro
|
||||
|
||||
@@ -177,6 +177,7 @@
|
||||
"yungs-menu-tweaks",
|
||||
"zume"
|
||||
],
|
||||
"globalForceIncludes": ["simply-tooltips"],
|
||||
"modpacks": {
|
||||
"all-of-fabric-6": {
|
||||
"forceIncludes": ["revelationary"]
|
||||
@@ -184,9 +185,15 @@
|
||||
"beyond-depth": {
|
||||
"forceIncludes": ["particular-reforged"]
|
||||
},
|
||||
"craftoria": {
|
||||
"forceIncludes": ["tmrv"]
|
||||
},
|
||||
"create-arcane-engineering": {
|
||||
"forceIncludes": ["just-enough-resources-jer"]
|
||||
},
|
||||
"fantasy-minecraft-fabric": {
|
||||
"forceIncludes": ["icon-leading-tooltip"]
|
||||
},
|
||||
"ftb-stoneblock-4": {
|
||||
"forceIncludes": [
|
||||
"particular-reforged",
|
||||
@@ -199,6 +206,12 @@
|
||||
"mob-player-animator"
|
||||
]
|
||||
},
|
||||
"nuclear-tech-integrated": {
|
||||
"overridesExclusions": [
|
||||
"mods/custommainmenu-*.jar",
|
||||
"mods/defaultworldgenerator-*.jar"
|
||||
]
|
||||
},
|
||||
"reclamation-reclaim-the-world": {
|
||||
"forceIncludes": [
|
||||
"more-overlays-updated"
|
||||
|
||||
@@ -48,9 +48,8 @@
|
||||
"fancymenu",
|
||||
"fast-ip-ping",
|
||||
"fastquit",
|
||||
"FauxCustomEntityData",
|
||||
"feytweaks",
|
||||
"figura",
|
||||
"/(^|/)figura-/",
|
||||
"ForgeConfigScreens",
|
||||
"GeckoLibIrisCompat",
|
||||
"gpumemleakfix",
|
||||
@@ -106,7 +105,7 @@
|
||||
"Zoomify",
|
||||
"zume"
|
||||
],
|
||||
"globalForceIncludes": [],
|
||||
"globalForceIncludes": ["/(^|/)simplytooltips-/", "/(^|/)s-lib-/"],
|
||||
"modpacks": {
|
||||
"cobbleverse": {
|
||||
"excludes": [
|
||||
|
||||
@@ -0,0 +1,247 @@
|
||||
{
|
||||
"patches": [
|
||||
{
|
||||
"file": "/data/pumpkin.toml",
|
||||
"ops": [
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.seed",
|
||||
"value": "${SEED}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.default_level_name",
|
||||
"value": "${LEVEL}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.default_gamemode",
|
||||
"value": "${PUMPKIN_GAMEMODE}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.default_difficulty",
|
||||
"value": "${PUMPKIN_DIFFICULTY}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.op_permission_level",
|
||||
"value": "${PUMPKIN_OP_PERMISSION_LEVEL}",
|
||||
"value-type": "int"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.spawn_protection",
|
||||
"value": "${PUMPKIN_SPAWN_PROTECTION}",
|
||||
"value-type": "int"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.hardcore",
|
||||
"value": "${PUMPKIN_HARDCORE}",
|
||||
"value-type": "bool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.allow_nether",
|
||||
"value": "${PUMPKIN_ALLOW_NETHER}",
|
||||
"value-type": "bool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.force_gamemode",
|
||||
"value": "${PUMPKIN_FORCE_GAMEMODE}",
|
||||
"value-type": "bool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.white_list",
|
||||
"value": "${PUMPKIN_WHITE_LIST}",
|
||||
"value-type": "bool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.enforce_whitelist",
|
||||
"value": "${PUMPKIN_ENFORCE_WHITELIST}",
|
||||
"value-type": "bool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.accepts_transfers",
|
||||
"value": "${PUMPKIN_ACCEPTS_TRANSFERS}",
|
||||
"value-type": "bool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.logging.level",
|
||||
"value": "${LOG_LEVEL}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.java.address",
|
||||
"value": "${PUMPKIN_JAVA_ADDRESS}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.java.online_mode",
|
||||
"value": "${PUMPKIN_ONLINE_MODE}",
|
||||
"value-type": "bool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.java.max_players",
|
||||
"value": "${PUMPKIN_MAX_PLAYERS}",
|
||||
"value-type": "int"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.java.view_distance",
|
||||
"value": "${PUMPKIN_VIEW_DISTANCE}",
|
||||
"value-type": "int"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.java.simulation_distance",
|
||||
"value": "${PUMPKIN_SIMULATION_DISTANCE}",
|
||||
"value-type": "int"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.java.motd",
|
||||
"value": "${MOTD}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.java.authentication.prevent_proxy_connections",
|
||||
"value": "${PUMPKIN_PREVENT_PROXY_CONNECTIONS}",
|
||||
"value-type": "bool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.bedrock.online_mode",
|
||||
"value": "${PUMPKIN_ONLINE_MODE}",
|
||||
"value-type": "bool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.bedrock.max_players",
|
||||
"value": "${PUMPKIN_MAX_PLAYERS}",
|
||||
"value-type": "int"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.bedrock.view_distance",
|
||||
"value": "${PUMPKIN_VIEW_DISTANCE}",
|
||||
"value-type": "int"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.bedrock.simulation_distance",
|
||||
"value": "${PUMPKIN_SIMULATION_DISTANCE}",
|
||||
"value-type": "int"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.bedrock.motd",
|
||||
"value": "${MOTD}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.query.enabled",
|
||||
"value": "${PUMPKIN_ENABLE_QUERY}",
|
||||
"value-type": "bool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.query.address",
|
||||
"value": "${PUMPKIN_QUERY_ADDRESS}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.rcon.enabled",
|
||||
"value": "${PUMPKIN_ENABLE_RCON}",
|
||||
"value-type": "bool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.rcon.address",
|
||||
"value": "${PUMPKIN_RCON_ADDRESS}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.networking.rcon.password",
|
||||
"value": "${RCON_PASSWORD}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.pvp.enabled",
|
||||
"value": "${PUMPKIN_PVP}",
|
||||
"value-type": "bool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.resource_pack.java.enabled",
|
||||
"value": "${PUMPKIN_RESOURCE_PACK_ENABLED}",
|
||||
"value-type": "bool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.resource_pack.java.url",
|
||||
"value": "${RESOURCE_PACK}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.resource_pack.java.sha1",
|
||||
"value": "${RESOURCE_PACK_SHA1}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.resource_pack.java.prompt_message",
|
||||
"value": "${RESOURCE_PACK_PROMPT}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"$set": {
|
||||
"path": "$.resource_pack.java.force",
|
||||
"value": "${PUMPKIN_RESOURCE_PACK_ENFORCE}",
|
||||
"value-type": "bool"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
seed = ""
|
||||
default_difficulty = "Normal"
|
||||
default_gamemode = "Survival"
|
||||
op_permission_level = 4
|
||||
allow_nether = true
|
||||
hardcore = false
|
||||
force_gamemode = false
|
||||
default_level_name = "world"
|
||||
white_list = false
|
||||
enforce_whitelist = false
|
||||
accepts_transfers = true
|
||||
spawn_protection = 16
|
||||
|
||||
[logging]
|
||||
level = "info"
|
||||
|
||||
[resource_pack.java]
|
||||
enabled = false
|
||||
url = ""
|
||||
sha1 = ""
|
||||
prompt_message = ""
|
||||
force = false
|
||||
|
||||
[networking.query]
|
||||
enabled = false
|
||||
address = "0.0.0.0:25565"
|
||||
|
||||
[networking.rcon]
|
||||
enabled = false
|
||||
address = "0.0.0.0:25575"
|
||||
password = ""
|
||||
|
||||
[networking.java]
|
||||
address = "0.0.0.0:25565"
|
||||
online_mode = true
|
||||
max_players = 1000
|
||||
view_distance = 16
|
||||
simulation_distance = 10
|
||||
motd = "A blazingly fast Pumpkin server!"
|
||||
|
||||
[networking.java.authentication]
|
||||
prevent_proxy_connections = false
|
||||
|
||||
[networking.bedrock]
|
||||
online_mode = true
|
||||
max_players = 1000
|
||||
view_distance = 16
|
||||
simulation_distance = 10
|
||||
motd = "A blazingly fast Pumpkin server!"
|
||||
|
||||
[pvp]
|
||||
enabled = true
|
||||
+17
-1
@@ -10,7 +10,23 @@
|
||||
"matchStrings": [
|
||||
"# renovate: datasource=(?<datasource>[a-z-]+?)(?: packageName=(?<packageName>.+?))?(?: versioning=(?<versioning>[a-z-]+))?\\s(?:ENV|ARG) .+?_VERSION=(?<currentValue>.+?)\\s"
|
||||
]
|
||||
},
|
||||
{
|
||||
"customType": "regex",
|
||||
"description": "Update versioned images used by Dockerfile COPY --from instructions",
|
||||
"managerFilePatterns": ["/^Dockerfile$/"],
|
||||
"matchStrings": [
|
||||
"COPY --from=(?<depName>[^:\\s]+):(?<currentValue>[^\\s]+)\\s"
|
||||
],
|
||||
"datasourceTemplate": "docker",
|
||||
"versioningTemplate": "docker"
|
||||
}
|
||||
],
|
||||
"labels": ["dependencies"]
|
||||
"labels": ["dependencies"],
|
||||
"packageRules": [
|
||||
{
|
||||
"matchUpdateTypes": ["minor", "patch"],
|
||||
"groupName": "all non-major dependencies"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash
|
||||
|
||||
: "${CLEANROOM_FORCE_REINSTALL:=false}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||||
isDebugging && set -x
|
||||
resultsFile=/data/.run-cleanroom.env
|
||||
|
||||
declare -a cleanroom_installer_options
|
||||
cleanroom_installer_options+=(--output-directory=/data)
|
||||
cleanroom_installer_options+=(--results-file="${resultsFile}")
|
||||
cleanroom_installer_options+=(--force-reinstall="${CLEANROOM_FORCE_REINSTALL}")
|
||||
|
||||
if [[ ${CLEANROOM_LOADER_VERSION} ]]; then
|
||||
cleanroom_installer_options+=(--loader-version="${CLEANROOM_LOADER_VERSION}")
|
||||
fi
|
||||
|
||||
if [[ ${CLEANROOM_INSTALLER_VERSION} ]]; then
|
||||
cleanroom_installer_options+=(--installer-version="${CLEANROOM_INSTALLER_VERSION}")
|
||||
fi
|
||||
|
||||
if [[ ${CLEANROOM_FROM_FILE} ]]; then
|
||||
cleanroom_installer_options+=(--from-local-file="${CLEANROOM_FROM_FILE}")
|
||||
fi
|
||||
|
||||
if [[ ${CLEANROOM_FROM_URL} ]]; then
|
||||
cleanroom_installer_options+=(--from-url="${CLEANROOM_FROM_URL}")
|
||||
fi
|
||||
|
||||
if [[ ${CLEANROOM_MAVEN_URL} ]]; then
|
||||
cleanroom_installer_options+=(--cleanroom-maven-url="${CLEANROOM_MAVEN_URL}")
|
||||
fi
|
||||
|
||||
if ! mc-image-helper install-cleanroom "${cleanroom_installer_options[@]}" ; then
|
||||
if [[ ${CLEANROOM_FROM_FILE} ]]; then
|
||||
logError "Failed to install Cleanroom given installer ${CLEANROOM_FROM_FILE}"
|
||||
elif [[ ${CLEANROOM_FROM_URL:-} ]]; then
|
||||
logError "Failed to install Cleanroom from ${CLEANROOM_FROM_URL}"
|
||||
else
|
||||
logError "Failed to install Cleanroom"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
applyResultsFile ${resultsFile}
|
||||
|
||||
export FAMILY=FORGE
|
||||
@@ -53,17 +53,6 @@ if [[ "$AUTOPAUSE_KNOCK_INTERFACE" == "lo" ]] ; then
|
||||
logWarning " Continuing with this setting."
|
||||
fi
|
||||
|
||||
if [[ -n "$MAX_TICK_TIME" && "$MAX_TICK_TIME" != "-1" ]] ; then
|
||||
logWarning "MAX_TICK_TIME is non-default, for autopause to work properly, this check should be disabled (-1 for versions >= 1.8.1)"
|
||||
elif [[ -z "$MAX_TICK_TIME" ]] ; then
|
||||
MAX_TICK_TIME=-1
|
||||
if versionLessThan 1.8.1; then
|
||||
# 10 years
|
||||
MAX_TICK_TIME=315360000000
|
||||
fi
|
||||
export MAX_TICK_TIME
|
||||
fi
|
||||
|
||||
# seq_cooldown cannot be larger than AUTOPAUSE_TIMEOUT_KN, otherwise the server may
|
||||
# become paused while knockd is still ignoring packets, preventing players from joining.
|
||||
let COOLDOWN=$AUTOPAUSE_TIMEOUT_KN/2
|
||||
|
||||
@@ -36,11 +36,6 @@ if isTrue "$PREFER_IPV6"; then
|
||||
export JVM_DD_OPTS
|
||||
fi
|
||||
|
||||
if (( $(mc-image-helper java-release) >= 17 )); then
|
||||
MC_IMAGE_HELPER_OPTS+=" --enable-native-access=ALL-UNNAMED"
|
||||
export MC_IMAGE_HELPER_OPTS
|
||||
fi
|
||||
|
||||
if [[ $(getDistro) == alpine ]]; then
|
||||
export LD_PRELOAD=/lib/libgcompat.so.0
|
||||
fi
|
||||
@@ -207,6 +202,17 @@ if isTrue "${VERSION_FROM_MODRINTH_PROJECTS:-}" && [[ ${MODRINTH_PROJECTS:-} ]];
|
||||
fi
|
||||
|
||||
if isTrue "${ENABLE_AUTOPAUSE}"; then
|
||||
if [[ -n "${MAX_TICK_TIME:-}" && "$MAX_TICK_TIME" != "-1" ]] ; then
|
||||
logWarning "MAX_TICK_TIME is non-default, for autopause to work properly, this check should be disabled (-1 for versions >= 1.8.1)"
|
||||
elif [[ -z "${MAX_TICK_TIME:-}" ]] ; then
|
||||
MAX_TICK_TIME=-1
|
||||
if versionLessThan 1.8.1; then
|
||||
# 10 years
|
||||
MAX_TICK_TIME=315360000000
|
||||
fi
|
||||
export MAX_TICK_TIME
|
||||
fi
|
||||
# Keep the default in this process so it reaches server.properties setup.
|
||||
"$(dirname "$0")/start-autopause"
|
||||
elif isTrue "${ENABLE_AUTOSTOP}"; then
|
||||
"$(dirname "$0")/start-autostop"
|
||||
@@ -283,6 +289,10 @@ case "${TYPE^^}" in
|
||||
exec "$(dirname "$0")/start-deployForge" "$@"
|
||||
;;
|
||||
|
||||
CLEANROOM)
|
||||
exec "$(dirname "$0")/start-deployCleanroom" "$@"
|
||||
;;
|
||||
|
||||
NEOFORGE|NEOFORGED)
|
||||
exec "$(dirname "$0")/start-deployNeoForge" "$@"
|
||||
;;
|
||||
@@ -343,6 +353,10 @@ case "${TYPE^^}" in
|
||||
exec "$(dirname "$0")/start-deployNanoLimbo" "$@"
|
||||
;;
|
||||
|
||||
PUMPKIN)
|
||||
exec "$(dirname "$0")/start-deployPumpkin" "$@"
|
||||
;;
|
||||
|
||||
CRUCIBLE)
|
||||
exec "$(dirname "$0")/start-deployCrucible" "$@"
|
||||
;;
|
||||
@@ -363,7 +377,8 @@ case "${TYPE^^}" in
|
||||
logError "Invalid TYPE: '$TYPE'"
|
||||
logError "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FOLIA, PURPUR, FABRIC, QUILT,"
|
||||
logError " SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, GTNH, AIRPLANE, PUFFERFISH,"
|
||||
logError " CANYON, LIMBO, NANOLIMBO, CRUCIBLE, LEAF, YOUER, BANNER, NEOFORGE"
|
||||
logError " CANYON, LIMBO, NANOLIMBO, PUMPKIN, CRUCIBLE, LEAF, YOUER, BANNER, NEOFORGE,"
|
||||
logError " CLEANROOM"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
|
||||
@@ -10,27 +10,22 @@ resolveVersion
|
||||
: "${ARCLIGHT_RELEASE:=latest}"
|
||||
: "${ARCLIGHT_TYPE:=neoforge}"
|
||||
|
||||
arclightReleasesUrl=https://api.github.com/repos/IzzelAliz/Arclight/releases
|
||||
if [[ ${ARCLIGHT_RELEASE^^} = LATEST ]]; then
|
||||
arclightReleaseUrl=${arclightReleasesUrl}/latest
|
||||
else
|
||||
arclightReleaseUrl=${arclightReleasesUrl}/tags/${ARCLIGHT_RELEASE}
|
||||
fi
|
||||
# An omitted --release-tag means the latest release, so only pass it when a
|
||||
# specific release was requested
|
||||
arclightReleaseArgs=()
|
||||
[[ ${ARCLIGHT_RELEASE} == latest ]] || arclightReleaseArgs+=(--release-tag="${ARCLIGHT_RELEASE}")
|
||||
|
||||
if ! downloadUrl=$(get --json-path "$.assets[?(@.name =~ /arclight-${ARCLIGHT_TYPE,,}-${VERSION}-.*\.jar/)].browser_download_url" \
|
||||
--accept "application/vnd.github.v3+json" "$arclightReleaseUrl"); then
|
||||
logError "Failed to access ${ARCLIGHT_RELEASE} release of Arclight"
|
||||
exit 1
|
||||
fi
|
||||
arclightRepo=IzzelAliz/Arclight
|
||||
|
||||
if [[ $downloadUrl = null ]]; then
|
||||
logError "Failed to locate Arclight jar for $VERSION from ${ARCLIGHT_RELEASE}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Downloading Arclight from $downloadUrl"
|
||||
if ! SERVER=$(get --skip-existing --output-filename -o /data "$downloadUrl"); then
|
||||
logError "Arclight jar from $downloadUrl"
|
||||
log "Downloading Arclight ${VERSION} ${ARCLIGHT_TYPE,,} from the ${ARCLIGHT_RELEASE} release"
|
||||
if ! SERVER=$(mc-image-helper github download-asset \
|
||||
"${arclightReleaseArgs[@]}" \
|
||||
--output-directory=/data \
|
||||
--name-pattern="^arclight-${ARCLIGHT_TYPE,,}-${VERSION}-.+\.jar$" \
|
||||
${arclightRepo}
|
||||
); then
|
||||
logError "Failed to download Arclight jar for ${VERSION} from the ${ARCLIGHT_RELEASE} release"
|
||||
logError "Ensure ARCLIGHT_RELEASE is one of the releases at ${arclightReleasesUrl}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -22,22 +22,11 @@ set -eu
|
||||
: "${CF_DOWNLOADS_REPO=$([ -d /downloads ] && echo '/downloads' || echo '')}"
|
||||
: "${CF_MODPACK_MANIFEST:=}"
|
||||
: "${CF_API_CACHE_DEFAULT_TTL:=}" # as ISO-8601 duration, such as P2D or PT12H
|
||||
: "${CF_API_KEY_FILE:=}" # Path to file containing CurseForge API key
|
||||
: "${CF_MOD_LOADER_VERSION:=}" # Override mod loader version
|
||||
: "${CF_USE_HTTP2:=false}" # CF downloads are faster with HTTP 1.1
|
||||
|
||||
resultsFile=/data/.install-curseforge.env
|
||||
|
||||
if [[ -n ${CF_API_KEY_FILE} ]]; then
|
||||
if [[ -r "${CF_API_KEY_FILE}" ]]; then
|
||||
CF_API_KEY="$(cat "${CF_API_KEY_FILE}")"
|
||||
export CF_API_KEY
|
||||
else
|
||||
logError "CF_API_KEY_FILE is not readable: ${CF_API_KEY_FILE}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
ensureRemoveAllModsOff "MODPACK_PLATFORM=AUTO_CURSEFORGE"
|
||||
|
||||
@@ -43,7 +43,7 @@ function buildSpigotFromSource {
|
||||
fi
|
||||
|
||||
logn ''
|
||||
curl -sSL -o ${tempDir}/BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar && \
|
||||
curl -fsSL -o "${tempDir}/BuildTools.jar" https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar && \
|
||||
java $jvmOpts -jar ${tempDir}/BuildTools.jar --rev "$VERSION" 2>&1 |tee ${spigotBuildLog}| while read l; do echo -n .; done; log "done"
|
||||
|
||||
case ${TYPE^^} in
|
||||
|
||||
@@ -127,7 +127,7 @@ if ! isTrue "${USE_MODPACK_START_SCRIPT:-true}"; then
|
||||
echo "${FTB_SERVER_MOD}" > $installMarker
|
||||
fi
|
||||
|
||||
SERVER=$(find "${FTB_BASE_DIR}" -maxdepth 2 -type f \( -path "/libraries/*" -o -path "/mods/*" \) -prune -o -name "forge*.jar" -not -name "forge*installer.jar" -print)
|
||||
SERVER=$(find "${FTB_BASE_DIR}" -maxdepth 2 -type f \( -path "*/libraries/*" -o -path "*/mods/*" \) -prune -o -name "forge*.jar" -not -name "forge*installer.jar" -print)
|
||||
if [[ -z "${SERVER}" || ! -f "${SERVER}" ]]; then
|
||||
logError "Unable to locate installed forge server jar"
|
||||
isDebugging && find "${FTB_BASE_DIR}" -name "forge*.jar"
|
||||
@@ -200,7 +200,7 @@ if [[ ! $startScript ]]; then
|
||||
# no, then look for a forge jar to run
|
||||
|
||||
# Allow up to 2 levels since some modpacks have a top-level directory named for the modpack
|
||||
forgeJar=$(find "${FTB_BASE_DIR}" -maxdepth 2 -type f \( -path "/libraries/*" -o -path "/mods/*" \) -prune -o -name "forge*.jar" -not -name "forge*installer.jar" -print)
|
||||
forgeJar=$(find "${FTB_BASE_DIR}" -maxdepth 2 -type f \( -path "*/libraries/*" -o -path "*/mods/*" \) -prune -o -name "forge*.jar" -not -name "forge*installer.jar" -print)
|
||||
if [[ "$forgeJar" ]]; then
|
||||
FTB_BASE_DIR=$(dirname "${forgeJar}")
|
||||
export FTB_BASE_DIR
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# run within the current shell to retain exported environment variables
|
||||
. "$(dirname "$0")/start-applyCleanroom"
|
||||
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
@@ -9,49 +9,43 @@ isDebugging && set -x
|
||||
resolveVersion
|
||||
: "${CRUCIBLE_RELEASE:=latest}"
|
||||
|
||||
crucibleReleasesUrl=https://api.github.com/repos/CrucibleMC/Crucible/releases
|
||||
if [[ ${CRUCIBLE_RELEASE^^} = LATEST ]]; then
|
||||
crucibleReleaseUrl=${crucibleReleasesUrl}/latest
|
||||
else
|
||||
crucibleReleaseUrl=${crucibleReleasesUrl}/tags/${CRUCIBLE_RELEASE}
|
||||
fi
|
||||
# An omitted --release-tag means the latest release, so only pass it when a
|
||||
# specific release was requested
|
||||
crucibleReleaseArgs=()
|
||||
[[ ${CRUCIBLE_RELEASE} == latest ]] || crucibleReleaseArgs+=(--release-tag="${CRUCIBLE_RELEASE}")
|
||||
|
||||
if ! downloadUrl=$(get --json-path "$.assets[?(@.name =~ /Crucible-${VERSION}-.*\.jar/)].browser_download_url" \
|
||||
--accept "application/vnd.github.v3+json" "$crucibleReleaseUrl"); then
|
||||
logError "Failed to access ${CRUCIBLE_RELEASE} release of Crucible"
|
||||
exit 1
|
||||
fi
|
||||
crucibleRepo=CrucibleMC/Crucible
|
||||
|
||||
if [[ $downloadUrl = null ]]; then
|
||||
logError "Failed to locate Crucible jar for $VERSION from ${CRUCIBLE_RELEASE}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Downloading Crucible from $downloadUrl"
|
||||
if ! SERVER=$(get --skip-existing --output-filename -o /data "$downloadUrl"); then
|
||||
logError "Crucible jar from $downloadUrl"
|
||||
log "Downloading Crucible ${VERSION} from the ${CRUCIBLE_RELEASE} release"
|
||||
if ! SERVER=$(mc-image-helper github download-asset \
|
||||
"${crucibleReleaseArgs[@]}" \
|
||||
--output-directory=/data \
|
||||
--name-pattern="^Crucible-${VERSION}-.+\.jar$" \
|
||||
${crucibleRepo}
|
||||
); then
|
||||
logError "Failed to download Crucible jar for ${VERSION} from the ${CRUCIBLE_RELEASE} release"
|
||||
logError "Ensure CRUCIBLE_RELEASE is one of the releases at ${crucibleReleasesUrl}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
librariesDir=/data/libraries
|
||||
if [ ! -d "$librariesDir" ]; then
|
||||
if ! librariesUrl=$(get --json-path "$.assets[?(@.name == 'libraries.zip')].browser_download_url" \
|
||||
--accept "application/vnd.github.v3+json" "$crucibleReleaseUrl"); then
|
||||
logError "Failed to access ${CRUCIBLE_RELEASE} release of Crucible for libraries"
|
||||
if ! librariesZip=$(mc-image-helper github download-asset \
|
||||
"${crucibleReleaseArgs[@]}" \
|
||||
--output-directory=/tmp \
|
||||
--name-pattern="^libraries\.zip$" \
|
||||
${crucibleRepo}
|
||||
); then
|
||||
logError "Failed to download Crucible libraries from the ${CRUCIBLE_RELEASE} release"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log "Downloading Crucible libraries"
|
||||
if ! get -o /tmp/libraries.zip "$librariesUrl"; then
|
||||
logError "Failed to download Crucible libraries from $librariesUrl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! unzip /tmp/libraries.zip -d "$librariesDir"; then
|
||||
if ! unzip "$librariesZip" -d "$librariesDir"; then
|
||||
logError "Failed to unzip Crucible libraries"
|
||||
exit 1
|
||||
fi
|
||||
rm /tmp/libraries.zip
|
||||
rm "$librariesZip"
|
||||
fi
|
||||
|
||||
export SERVER
|
||||
|
||||
@@ -16,8 +16,8 @@ if isURL "${CUSTOM_SERVER}"; then
|
||||
log "Using previously downloaded jar at ${SERVER}"
|
||||
else
|
||||
log "Downloading custom server jar from ${CUSTOM_SERVER} ..."
|
||||
if ! curl -sSL -o "${SERVER}" "${CUSTOM_SERVER}"; then
|
||||
log "Failed to download from ${CUSTOM_SERVER}"
|
||||
if ! curl -fsSL -o "${SERVER}" "${CUSTOM_SERVER}"; then
|
||||
logError "Failed to download from ${CUSTOM_SERVER}"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -9,7 +9,7 @@ ftbInstallMarker=".ftb-installed"
|
||||
# shellcheck source=start-utils
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
set -e
|
||||
set -e -o pipefail
|
||||
|
||||
#
|
||||
#{
|
||||
@@ -93,7 +93,10 @@ if isTrue "$FTB_FORCE_REINSTALL" ||
|
||||
|
||||
log "Installing modpack ID ${FTB_MODPACK_ID}, version ID ${FTB_MODPACK_VERSION_ID}"
|
||||
log "This could take a while..."
|
||||
${ftbInstaller} -pack "${FTB_MODPACK_ID}" -version "${FTB_MODPACK_VERSION_ID}" -auto -force -no-java | tee ftb-installer.log
|
||||
if ! ${ftbInstaller} -pack "${FTB_MODPACK_ID}" -version "${FTB_MODPACK_VERSION_ID}" -auto -force -no-java | tee ftb-installer.log; then
|
||||
logError "FTB installer failed for modpack ID ${FTB_MODPACK_ID}, version ID ${FTB_MODPACK_VERSION_ID}"
|
||||
exit 1
|
||||
fi
|
||||
rm -f forge*installer.jar
|
||||
|
||||
echo "${FTB_MODPACK_ID}=${FTB_MODPACK_VERSION_ID}" > ${ftbInstallMarker}
|
||||
@@ -140,9 +143,9 @@ if [[ $SERVER = run.sh ]]; then
|
||||
elif grep -q forge "$SERVER"; then
|
||||
export FAMILY=FORGE
|
||||
export TYPE=FORGE
|
||||
elif grep -q fabric run.s; then
|
||||
export FAMILY=FABRIC
|
||||
export TYPE=FABRIC
|
||||
elif grep -q fabric "$SERVER"; then
|
||||
export FAMILY=FABRIC
|
||||
export TYPE=FABRIC
|
||||
else
|
||||
logError "Unrecognized loader type in $SERVER"
|
||||
cat "$SERVER"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
: "${FORGE_VERSION:=${FORGEVERSION:-RECOMMENDED}}"
|
||||
: "${FORGE_FORCE_REINSTALL:=false}}"
|
||||
: "${FORGE_FORCE_REINSTALL:=false}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||||
|
||||
+37
-23
@@ -4,9 +4,33 @@
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
# Define setup functions
|
||||
function getGTNHversion(){
|
||||
local gtnh_versions_json_url="https://downloads.gtnewhorizons.com/versions.json"
|
||||
local json
|
||||
local result
|
||||
|
||||
if ! json="$(curl -fsSL "$gtnh_versions_json_url")"; then
|
||||
logError "Failed to download from \"$gtnh_versions_json_url\"" >&2
|
||||
return 1
|
||||
elif [[ -z $json ]]; then
|
||||
logError "Empty response from \"$gtnh_versions_json_url\"" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! result="$(jq "$@" <<< "$json")"; then
|
||||
logError "Failed to parse the versions file from \"$gtnh_versions_json_url\"" >&2
|
||||
return 1
|
||||
elif [[ $result == "null" ]] || [[ -z $result ]]; then
|
||||
logError "No release found for GTNH_PACK_VERSION=$GTNH_PACK_VERSION. Please check if the version is valid." >&2
|
||||
return 1
|
||||
fi
|
||||
printf '%s\n' "$result"
|
||||
}
|
||||
|
||||
function getGTNHdownloadPath(){
|
||||
gtnh_download_path=""
|
||||
local release_object=""
|
||||
local log_version_from=""
|
||||
|
||||
# Select release JSON object
|
||||
# latest-dev will be removed in the future, but is still supported for now.
|
||||
@@ -14,37 +38,24 @@ function getGTNHdownloadPath(){
|
||||
if [ "$GTNH_PACK_VERSION" == "latest-dev" ]; then
|
||||
logWarning "GTNH_PACK_VERSION=latest-dev is deprecated and will be removed in the future."
|
||||
fi
|
||||
if ! release_object="$(
|
||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
||||
| jq -r '(.versions // .)|to_entries|sort_by(.value.releaseDate)|map(select(.value.title=="Beta release"))|.[-1]'
|
||||
)"; then logError "Failed to retrieve release from https://downloads.gtnewhorizons.com/versions.json"
|
||||
exit 1
|
||||
fi
|
||||
log "Selected $(jq '.key' <<< "$release_object") as latest dev version for download."
|
||||
release_object=$(getGTNHversion '(.versions // .)|to_entries|map(select(.value.title == "Beta release"))|sort_by(.value.releaseDate,(.key | ascii_downcase | if test("rc") then 2 elif test("beta") then 1 else 0 end))|.[-1]') || exit 1
|
||||
log_version_from="latest beta";
|
||||
|
||||
elif [ "$GTNH_PACK_VERSION" == "latest" ]; then
|
||||
if ! release_object="$(
|
||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
||||
| jq -r '(.versions // .)|to_entries|sort_by(.value.releaseDate)|map(select(.value.title=="Stable release"))|.[-1]'
|
||||
)"; then logError "Failed to retrieve release from https://downloads.gtnewhorizons.com/versions.json"
|
||||
exit 1
|
||||
fi
|
||||
log "Selected $(jq '.key' <<< "$release_object") as latest version for download."
|
||||
|
||||
release_object=$(getGTNHversion '(.versions // .)|to_entries|sort_by(.value.releaseDate)|map(select(.value.title=="Stable release"))|.[-1]') || exit 1
|
||||
log_version_from="latest";
|
||||
|
||||
else
|
||||
if ! release_object="$(
|
||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
||||
| jq -r --arg USRIN "$GTNH_PACK_VERSION" '(.versions // .)|to_entries|sort_by(.value.releaseDate)|map(select(.key==$USRIN))|.[]'
|
||||
)"; then logError "Failed to retrieve release from https://downloads.gtnewhorizons.com/versions.json"
|
||||
exit 1
|
||||
fi
|
||||
log "Selected $(jq -r '.key' <<< "$release_object") as matching version for download."
|
||||
|
||||
release_object=$(getGTNHversion --arg USRIN "$GTNH_PACK_VERSION" '($USRIN | ascii_downcase) as $in|(.versions // .)|to_entries|sort_by(.value.releaseDate)|map(select((.key | ascii_downcase)==$in))|.[]') || exit 1
|
||||
log_version_from="matching";
|
||||
|
||||
fi
|
||||
|
||||
if [[ -z $release_object ]]; then
|
||||
logError "No release found for GTNH_PACK_VERSION=$GTNH_PACK_VERSION. Please check if the version is valid."
|
||||
exit 1
|
||||
else
|
||||
log "Selected \"$(jq -r '.key' <<< "$release_object")\" as ${log_version_from} version for download."
|
||||
fi
|
||||
|
||||
# Select compatible server files for java version
|
||||
@@ -312,6 +323,9 @@ function handleGTNH() {
|
||||
fi
|
||||
else
|
||||
log "SKIP_GTNH_UPDATE_CHECK=$SKIP_GTNH_UPDATE_CHECK ... Skipping GTNH Update/Install"
|
||||
if [[ ! -f /data/.gtnh-version ]]; then
|
||||
logWarning "No .gtnh-version file detected! There might not be a valid GTNH server installation in /data. Please ensure that the server files are present or set SKIP_GTNH_UPDATE_CHECK=false to allow the script to download and install the server files."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -4,12 +4,21 @@
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
if ! SERVER=$(mc-image-helper github download-latest-asset \
|
||||
: "${KETTING_RELEASE:=latest}"
|
||||
|
||||
# Only pass --release-tag when a specific release was requested; helper treats
|
||||
# omitted as latest
|
||||
kettingReleaseArgs=()
|
||||
[[ ${KETTING_RELEASE} == latest ]] || kettingReleaseArgs+=(--release-tag="${KETTING_RELEASE}")
|
||||
|
||||
if ! SERVER=$(mc-image-helper github download-asset \
|
||||
"${kettingReleaseArgs[@]}" \
|
||||
--output-directory=/data \
|
||||
--name-pattern="kettinglauncher-.+?(?<!-sources)\.jar" \
|
||||
kettingpowered/kettinglauncher
|
||||
); then
|
||||
logError "Failed to download Ketting launcher"
|
||||
logError "Failed to download Ketting launcher release ${KETTING_RELEASE}"
|
||||
logError "Ensure KETTING_RELEASE is one of the releases at https://github.com/kettingpowered/kettinglauncher/releases"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -4,12 +4,21 @@
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
if ! SERVER=$(mc-image-helper github download-latest-asset \
|
||||
: "${NANOLIMBO_RELEASE:=latest}"
|
||||
|
||||
# Only pass --release-tag when a specific release was requested; helper treats
|
||||
# omitted as latest
|
||||
nanolimboReleaseArgs=()
|
||||
[[ ${NANOLIMBO_RELEASE} == latest ]] || nanolimboReleaseArgs+=(--release-tag="${NANOLIMBO_RELEASE}")
|
||||
|
||||
if ! SERVER=$(mc-image-helper github download-asset \
|
||||
"${nanolimboReleaseArgs[@]}" \
|
||||
--output-directory=/data \
|
||||
--name-pattern="NanoLimbo(-.+?(?<!-sources))?\.jar" \
|
||||
BoomEaro/NanoLimbo
|
||||
); then
|
||||
logError "Failed to download NanoLimbo"
|
||||
logError "Failed to download NanoLimbo release ${NANOLIMBO_RELEASE}"
|
||||
logError "Ensure NANOLIMBO_RELEASE is one of the releases at https://github.com/BoomEaro/NanoLimbo/releases"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
: "${NEOFORGE_VERSION:=latest}"
|
||||
: "${NEOFORGE_FORCE_REINSTALL:=false}}"
|
||||
: "${NEOFORGE_FORCE_REINSTALL:=false}"
|
||||
: "${NEOFORGE_INSTALLER:=}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
|
||||
@@ -13,21 +13,30 @@ if [ "${VERSION}" != "b1.7.3" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# : "${POSEIDON_RELEASE:=latest}" placeholder until I figure out how to add version selection with mc-image-helper
|
||||
: "${POSEIDON_RELEASE:=latest}"
|
||||
: "${POSEIDON_TYPE:=poseidon}"
|
||||
|
||||
# Only pass --release-tag when a specific release was requested; helper treats
|
||||
# omitted as latest
|
||||
poseidonReleaseArgs=()
|
||||
[[ ${POSEIDON_RELEASE} == latest ]] || poseidonReleaseArgs+=(--release-tag="${POSEIDON_RELEASE}")
|
||||
|
||||
if [[ ${POSEIDON_TYPE^^} = UBERBUKKIT ]]; then
|
||||
poseidonRepo="Moresteck/uberbukkit"
|
||||
else
|
||||
poseidonRepo="retromcorg/Project-Poseidon"
|
||||
fi
|
||||
|
||||
if ! SERVER=$(mc-image-helper github download-latest-asset \
|
||||
poseidonReleasesUrl=https://github.com/${poseidonRepo}/releases
|
||||
|
||||
if ! SERVER=$(mc-image-helper github download-asset \
|
||||
"${poseidonReleaseArgs[@]}" \
|
||||
--output-directory=/data \
|
||||
--name-pattern="^(?!original-).+\.jar" \
|
||||
${poseidonRepo}
|
||||
); then
|
||||
logError "Failed to download ${POSEIDON_TYPE}"
|
||||
logError "Failed to download ${POSEIDON_TYPE} release ${POSEIDON_RELEASE}"
|
||||
logError "Ensure POSEIDON_RELEASE is one of the releases at ${poseidonReleasesUrl}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Executable
+179
@@ -0,0 +1,179 @@
|
||||
#!/bin/bash
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "${SCRIPTS:-$(dirname "$0")}/start-utils"
|
||||
set -o pipefail
|
||||
set -e
|
||||
isDebugging && set -x
|
||||
|
||||
# Pumpkin is released as a native executable per platform
|
||||
case "$(uname -m)" in
|
||||
x86_64 | amd64)
|
||||
pumpkinArch=X64
|
||||
;;
|
||||
aarch64 | arm64)
|
||||
pumpkinArch=ARM64
|
||||
;;
|
||||
*)
|
||||
logError "Pumpkin does not provide a Linux build for $(uname -m)"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
pumpkinAsset="pumpkin-${pumpkinArch}-Linux"
|
||||
# The Alpine based image needs the musl linked build
|
||||
if [[ $(getDistro) == alpine ]]; then
|
||||
pumpkinAsset+="-musl"
|
||||
fi
|
||||
|
||||
pumpkinReleasesUrl=https://github.com/Pumpkin-MC/Pumpkin/releases
|
||||
: "${PUMPKIN_RELEASE:=latest}"
|
||||
|
||||
# Only pass --release-tag when a specific release was requested; helper treats
|
||||
# omitted as latest
|
||||
pumpkinReleaseArgs=()
|
||||
[[ ${PUMPKIN_RELEASE} == latest ]] || pumpkinReleaseArgs+=(--release-tag="${PUMPKIN_RELEASE}")
|
||||
|
||||
# The asset is downloaded to a fixed filename, so discard a previously
|
||||
# downloaded executable when a different release is requested
|
||||
pumpkinReleaseMarker=/data/.pumpkin-release
|
||||
if [[ -f "${pumpkinReleaseMarker}" && $(<"${pumpkinReleaseMarker}") != "${PUMPKIN_RELEASE}" ]]; then
|
||||
log "Switching Pumpkin release from $(<"${pumpkinReleaseMarker}") to ${PUMPKIN_RELEASE}"
|
||||
rm -f "/data/${pumpkinAsset}"
|
||||
fi
|
||||
|
||||
if isTrue "${FORCE_REDOWNLOAD:-false}"; then
|
||||
log "Forcing re-download of ${pumpkinAsset}"
|
||||
rm -f "/data/${pumpkinAsset}"
|
||||
fi
|
||||
|
||||
if ! SERVER=$(mc-image-helper github download-asset \
|
||||
"${pumpkinReleaseArgs[@]}" \
|
||||
--output-directory=/data \
|
||||
--name-pattern="^${pumpkinAsset}$" \
|
||||
Pumpkin-MC/Pumpkin
|
||||
); then
|
||||
logError "Failed to download ${pumpkinAsset} from the Pumpkin release ${PUMPKIN_RELEASE}"
|
||||
logError "Ensure PUMPKIN_RELEASE is one of the releases at ${pumpkinReleasesUrl}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf '%s' "${PUMPKIN_RELEASE}" > "${pumpkinReleaseMarker}"
|
||||
|
||||
log "Using Pumpkin server executable ${SERVER}"
|
||||
if [[ ! -x "${SERVER}" ]]; then
|
||||
chmod +x "${SERVER}"
|
||||
fi
|
||||
|
||||
export SERVER
|
||||
# Native executable, so the final exec skips the JVM handling
|
||||
export FAMILY=NATIVE
|
||||
|
||||
pumpkinConfig=/data/pumpkin.toml
|
||||
|
||||
# Narrow booleans to the values that the patch bool conversion accepts
|
||||
function exportBoolean() {
|
||||
local target=$1
|
||||
local source=$2
|
||||
if [[ -v $source ]]; then
|
||||
local value=false
|
||||
if isTrue "${!source}"; then
|
||||
value=true
|
||||
fi
|
||||
printf -v "$target" '%s' "$value"
|
||||
export "$target"
|
||||
fi
|
||||
}
|
||||
|
||||
function exportInteger() {
|
||||
local target=$1
|
||||
local source=$2
|
||||
if [[ -v $source ]] && isNumeric "${!source}"; then
|
||||
printf -v "$target" '%s' "${!source}"
|
||||
export "$target"
|
||||
fi
|
||||
}
|
||||
|
||||
function normalizeGamemode() {
|
||||
case "${1,,}" in
|
||||
0 | su*) echo Survival ;;
|
||||
1 | c*) echo Creative ;;
|
||||
2 | a*) echo Adventure ;;
|
||||
3 | sp*) echo Spectator ;;
|
||||
*) echo "$1" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
function normalizeDifficulty() {
|
||||
case "${1,,}" in
|
||||
0 | p*) echo Peaceful ;;
|
||||
1 | e*) echo Easy ;;
|
||||
2 | n*) echo Normal ;;
|
||||
3 | h*) echo Hard ;;
|
||||
*) echo "$1" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
exportBoolean PUMPKIN_ONLINE_MODE ONLINE_MODE
|
||||
exportBoolean PUMPKIN_HARDCORE HARDCORE
|
||||
exportBoolean PUMPKIN_ALLOW_NETHER ALLOW_NETHER
|
||||
exportBoolean PUMPKIN_FORCE_GAMEMODE FORCE_GAMEMODE
|
||||
exportBoolean PUMPKIN_ENFORCE_WHITELIST ENFORCE_WHITELIST
|
||||
exportBoolean PUMPKIN_ACCEPTS_TRANSFERS ACCEPTS_TRANSFERS
|
||||
exportBoolean PUMPKIN_PREVENT_PROXY_CONNECTIONS PREVENT_PROXY_CONNECTIONS
|
||||
exportBoolean PUMPKIN_PVP PVP
|
||||
exportBoolean PUMPKIN_ENABLE_RCON ENABLE_RCON
|
||||
exportBoolean PUMPKIN_ENABLE_QUERY ENABLE_QUERY
|
||||
exportBoolean PUMPKIN_RESOURCE_PACK_ENFORCE RESOURCE_PACK_ENFORCE
|
||||
|
||||
exportInteger PUMPKIN_MAX_PLAYERS MAX_PLAYERS
|
||||
exportInteger PUMPKIN_VIEW_DISTANCE VIEW_DISTANCE
|
||||
exportInteger PUMPKIN_SIMULATION_DISTANCE SIMULATION_DISTANCE
|
||||
exportInteger PUMPKIN_OP_PERMISSION_LEVEL OP_PERMISSION_LEVEL
|
||||
exportInteger PUMPKIN_SPAWN_PROTECTION SPAWN_PROTECTION
|
||||
|
||||
if [[ -v MODE ]]; then
|
||||
PUMPKIN_GAMEMODE=$(normalizeGamemode "$MODE")
|
||||
export PUMPKIN_GAMEMODE
|
||||
fi
|
||||
|
||||
if [[ -v DIFFICULTY ]]; then
|
||||
PUMPKIN_DIFFICULTY=$(normalizeDifficulty "$DIFFICULTY")
|
||||
export PUMPKIN_DIFFICULTY
|
||||
fi
|
||||
|
||||
# The image enables the whitelist whenever one is provided
|
||||
if [[ -v WHITELIST || -v WHITELIST_FILE ]]; then
|
||||
export PUMPKIN_WHITE_LIST=true
|
||||
else
|
||||
exportBoolean PUMPKIN_WHITE_LIST ENABLE_WHITELIST
|
||||
fi
|
||||
|
||||
if [[ -v RESOURCE_PACK ]]; then
|
||||
export PUMPKIN_RESOURCE_PACK_ENABLED=true
|
||||
fi
|
||||
|
||||
# Only override the listening addresses when a port was declared
|
||||
if [[ -v SERVER_PORT ]]; then
|
||||
export PUMPKIN_JAVA_ADDRESS="0.0.0.0:${SERVER_PORT}"
|
||||
fi
|
||||
if [[ -v RCON_PORT ]]; then
|
||||
export PUMPKIN_RCON_ADDRESS="0.0.0.0:${RCON_PORT}"
|
||||
fi
|
||||
if [[ -v QUERY_PORT ]]; then
|
||||
export PUMPKIN_QUERY_ADDRESS="0.0.0.0:${QUERY_PORT}"
|
||||
fi
|
||||
|
||||
if [[ ! -f "$pumpkinConfig" ]]; then
|
||||
log "Creating initial Pumpkin configuration"
|
||||
cp /image/pumpkin.toml "$pumpkinConfig"
|
||||
fi
|
||||
|
||||
log "Applying Pumpkin configuration from environment variables"
|
||||
# Undeclared variables only warn, so only surface failures
|
||||
if ! pumpkinPatchResult=$(mc-image-helper patch --patch-env-prefix "" /image/pumpkin-config-patch.json 2>&1); then
|
||||
logWarning "Failed to apply one or more settings to ${pumpkinConfig}"
|
||||
echo "$pumpkinPatchResult" | applyLogPrefix
|
||||
fi
|
||||
|
||||
exec "$(dirname "$0")/start-setupWorld" "$@"
|
||||
@@ -22,18 +22,28 @@ case "$SPONGEBRANCH" in
|
||||
esac
|
||||
|
||||
# If not SPONGEVERSION selected, detect last version on selected branch
|
||||
if [ -z $SPONGEVERSION ]; then
|
||||
if [ -z "$SPONGEVERSION" ]; then
|
||||
log "Choosing Version for Sponge"
|
||||
SPONGEVERSION=$(curl -fsSL https://dl-api.spongepowered.org/v1/org.spongepowered/$TYPE | jq -r --arg SPONGEBRANCH "$SPONGEBRANCH" '.buildTypes.$SPONGEBRANCH.latest.version')
|
||||
if ! SPONGEVERSION=$(curl -fsSL "https://dl-api.spongepowered.org/v1/org.spongepowered/$TYPE" | jq -r --arg SPONGEBRANCH "$SPONGEBRANCH" '.buildTypes[$SPONGEBRANCH].latest.version'); then
|
||||
logError "Failed to resolve latest SpongeVanilla version from the Sponge downloads API"
|
||||
exit 1
|
||||
fi
|
||||
if [[ -z $SPONGEVERSION || $SPONGEVERSION == null ]]; then
|
||||
logError "Sponge downloads API did not return a version for branch $SPONGEBRANCH"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
VERSION="$SPONGEVERSION"
|
||||
export VERSION
|
||||
export SERVER="spongevanilla-$SPONGEVERSION.jar"
|
||||
|
||||
if [ ! -e "$SERVER" ] || [ -n "$FORCE_REDOWNLOAD" ]; then
|
||||
if [ ! -e "$SERVER" ] || isTrue "${FORCE_REDOWNLOAD}"; then
|
||||
log "Downloading $SERVER ..."
|
||||
curl -sSL -o "$SERVER" "https://repo.spongepowered.org/maven/org/spongepowered/$TYPE/$SPONGEVERSION/$SERVER"
|
||||
if ! curl -fsSL -o "$SERVER" "https://repo.spongepowered.org/maven/org/spongepowered/$TYPE/$SPONGEVERSION/$SERVER"; then
|
||||
logError "Failed to download $SERVER"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
export FAMILY=SPONGE
|
||||
|
||||
+77
-15
@@ -4,10 +4,27 @@
|
||||
: "${SETUP_ONLY:=false}"
|
||||
: "${CUSTOM_JAR_EXEC:=}"
|
||||
: "${SERVER_RUNNER:=mc-server-runner}"
|
||||
: "${PRE_START_SCRIPT:=}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "$(dirname "$0")/start-utils"
|
||||
isDebugging && set -x
|
||||
|
||||
function runPreStartScript() {
|
||||
if [[ ! $PRE_START_SCRIPT ]]; then
|
||||
return
|
||||
fi
|
||||
if [[ ! -x $PRE_START_SCRIPT ]]; then
|
||||
logError "PRE_START_SCRIPT $PRE_START_SCRIPT is not an executable file"
|
||||
exit 1
|
||||
fi
|
||||
log "Running pre-start script $PRE_START_SCRIPT..."
|
||||
if ! "$PRE_START_SCRIPT"; then
|
||||
logError "Pre-start script $PRE_START_SCRIPT failed, so the server will not be started"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
baseDataDir=/data
|
||||
tmpServerIconPath=/tmp/icon.img
|
||||
serverIconPath=${baseDataDir}/server-icon.png
|
||||
@@ -74,7 +91,9 @@ oldState=$(shopt -po xtrace || true)
|
||||
shopt -u -o xtrace
|
||||
# Patch Log4j remote code execution vulnerability
|
||||
# See https://www.minecraft.net/en-us/article/important-message--security-vulnerability-java-edition
|
||||
if versionLessThan 1.7; then
|
||||
if isFamily NATIVE; then
|
||||
: # Native server, so there is no log4j to patch
|
||||
elif versionLessThan 1.7; then
|
||||
: # No patch required here.
|
||||
elif isFamily VANILLA && versionLessThan 1.12; then
|
||||
patchLog4jConfig log4j2_17-111.xml https://launcher.mojang.com/v1/objects/dd2b723346a8dcd48e7f4d245f6bf09e98db9696/log4j2_17-111.xml
|
||||
@@ -94,7 +113,9 @@ if ${useFallbackJvmFlag}; then
|
||||
JVM_OPTS="-Dlog4j2.formatMsgNoLookups=true ${JVM_OPTS}"
|
||||
fi
|
||||
|
||||
if versionLessThan 1.7; then
|
||||
if isFamily NATIVE; then
|
||||
: # Native server, so no Log4jPatcher agent
|
||||
elif versionLessThan 1.7; then
|
||||
: # No patch required here.
|
||||
elif versionLessThan 1.18.1; then
|
||||
if isTrue "${SKIP_LOG4J_PATCHER:-false}"; then
|
||||
@@ -106,7 +127,9 @@ fi
|
||||
|
||||
# Set up log4j2 configuration with templating support
|
||||
LOGFILE="${SERVER_DIR}/log4j2.xml"
|
||||
if ${useGeneratedLogs}; then
|
||||
if isFamily NATIVE; then
|
||||
: # Native server, so no log4j configuration
|
||||
elif ${useGeneratedLogs}; then
|
||||
# Set up log configuration defaults
|
||||
: "${LOG_LEVEL:=info}"
|
||||
: "${ROLLING_LOG_MAX_FILES:=1000}"
|
||||
@@ -178,12 +201,12 @@ else
|
||||
fi
|
||||
|
||||
# Optional disable console
|
||||
if versionLessThan 1.14 && [[ ${CONSOLE,,} = false ]]; then
|
||||
if ! isFamily NATIVE && versionLessThan 1.14 && [[ ${CONSOLE,,} = false ]]; then
|
||||
EXTRA_ARGS+=" --noconsole"
|
||||
fi
|
||||
|
||||
# Optional disable GUI for headless servers
|
||||
if [[ ${GUI,,} = false ]]; then
|
||||
if ! isFamily NATIVE && [[ ${GUI,,} = false ]]; then
|
||||
EXTRA_ARGS+=" nogui"
|
||||
fi
|
||||
|
||||
@@ -375,7 +398,6 @@ if isTrue "${USE_MEOWICE_GRAALVM_FLAGS}"; then
|
||||
-Djdk.graal.TuneInlinerExploration=1
|
||||
-Djdk.graal.LoopRotation=true
|
||||
-Djdk.graal.CompilerConfiguration=enterprise
|
||||
--enable-native-access=ALL-UNNAMED
|
||||
"
|
||||
else
|
||||
log "Using MeowIce's flags for Graalvm"
|
||||
@@ -455,7 +477,10 @@ function copyFilesForCurseForge() {
|
||||
cp -f ${baseDataDir}/eula.txt "${FTB_DIR}/"
|
||||
}
|
||||
|
||||
if versionLessThan 'b1.8'; then
|
||||
if isFamily NATIVE; then
|
||||
# Native server, always probed with the modern server list ping
|
||||
rm -f "$mcHealthEnvPath"
|
||||
elif versionLessThan 'b1.8'; then
|
||||
echo "
|
||||
DISABLE_HEALTHCHECK=true
|
||||
" > "$mcHealthEnvPath"
|
||||
@@ -491,7 +516,7 @@ if [[ ${STOP_SERVER_ANNOUNCE_DELAY} ]]; then
|
||||
mcServerRunnerArgs+=(--stop-server-announce-delay "${STOP_SERVER_ANNOUNCE_DELAY}s")
|
||||
fi
|
||||
if [[ ${STOP_SERVER_DELAY_COMMAND} ]]; then
|
||||
mcServerRunnerArgs+=(--stop-server-delay-command "${STOP_SERVER_DELAY_COMMAND}s")
|
||||
mcServerRunnerArgs+=(--stop-server-delay-command "${STOP_SERVER_DELAY_COMMAND}")
|
||||
fi
|
||||
if isTrue "${ENABLE_SSH}"; then
|
||||
mcServerRunnerArgs+=(--remote-console)
|
||||
@@ -500,8 +525,12 @@ fi
|
||||
if [[ ${TYPE} == "CURSEFORGE" && "${SERVER}" ]]; then
|
||||
copyFilesForCurseForge
|
||||
|
||||
cd "${FTB_DIR}" || (logError "Can't go into ${FTB_DIR}"; exit 1)
|
||||
if ! cd "${FTB_DIR}"; then
|
||||
logError "Can't go into ${FTB_DIR}"
|
||||
exit 1
|
||||
fi
|
||||
log "Starting CurseForge server in ${FTB_DIR}..."
|
||||
runPreStartScript
|
||||
if isTrue "${DEBUG_EXEC}"; then
|
||||
set -x
|
||||
fi
|
||||
@@ -513,11 +542,15 @@ elif [[ ${TYPE} == "CURSEFORGE" ]]; then
|
||||
|
||||
if isPercentage "$INIT_MEMORY" || isPercentage "$MAX_MEMORY"; then
|
||||
# Convert to bytes
|
||||
NORM_INIT_MEM=$(normalizeMemSize "$INIT_MEMORY")
|
||||
NORM_MAX_MEM=$(normalizeMemSize "$MAX_MEMORY")
|
||||
# Convert to MB
|
||||
((NORM_INIT_MEM*=1048576))
|
||||
((NORM_MAX_MEM*=1048576))
|
||||
if ! NORM_INIT_MEM=$(normalizeMemSize "$INIT_MEMORY"); then
|
||||
exit 1
|
||||
fi
|
||||
if ! NORM_MAX_MEM=$(normalizeMemSize "$MAX_MEMORY"); then
|
||||
exit 1
|
||||
fi
|
||||
# Convert bytes to MB
|
||||
((NORM_INIT_MEM/=1048576))
|
||||
((NORM_MAX_MEM/=1048576))
|
||||
|
||||
cat > "${FTB_DIR}/settings-local.sh" <<EOF
|
||||
export MIN_RAM="${NORM_INIT_MEM}M"
|
||||
@@ -541,7 +574,10 @@ fi
|
||||
fi
|
||||
fi
|
||||
|
||||
cd "${FTB_DIR}" || (logError "Can't go into ${FTB_DIR}"; exit 1)
|
||||
if ! cd "${FTB_DIR}"; then
|
||||
logError "Can't go into ${FTB_DIR}"
|
||||
exit 1
|
||||
fi
|
||||
log "Running FTB ${FTB_SERVER_START} in ${FTB_DIR} ..."
|
||||
|
||||
finalArgs="${FTB_SERVER_START}"
|
||||
@@ -559,6 +595,7 @@ fi
|
||||
JVM_ARGS=${JVM_ARGS//$'\n'/}
|
||||
sed -i "s~JAVA_ARGS=.*~JAVA_ARGS=\"${JVM_ARGS}\"~" "${FTB_DIR}/variables.txt"
|
||||
fi
|
||||
runPreStartScript
|
||||
exec ${SERVER_RUNNER} "${mcServerRunnerArgs[@]}" -- "${finalArgs[@]}"
|
||||
elif [[ $SERVER =~ run.sh ]]; then
|
||||
log "Using Forge supplied run.sh script..."
|
||||
@@ -567,10 +604,34 @@ elif [[ $SERVER =~ run.sh ]]; then
|
||||
echo "SETUP_ONLY: bash ${SERVER}"
|
||||
exit
|
||||
fi
|
||||
runPreStartScript
|
||||
if isTrue "${DEBUG_EXEC}"; then
|
||||
set -x
|
||||
fi
|
||||
exec ${SERVER_RUNNER} "${mcServerRunnerArgs[@]}" --shell bash -- "${SERVER}" $EXTRA_ARGS
|
||||
elif isFamily NATIVE; then
|
||||
# Native server, so no JVM arguments
|
||||
if [[ ! -x "$SERVER" ]]; then
|
||||
log "Making $SERVER executable"
|
||||
if ! chmod +x "$SERVER"; then
|
||||
logError "Failed to make $SERVER executable"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if isTrue "${SETUP_ONLY}"; then
|
||||
echo "SETUP_ONLY: ${SERVER}"
|
||||
exit
|
||||
fi
|
||||
|
||||
runPreStartScript
|
||||
if isTrue "${DEBUG_EXEC}"; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
log "Starting the Minecraft server..."
|
||||
# shellcheck disable=SC2086
|
||||
exec ${SERVER_RUNNER} ${bootstrapArgs} "${mcServerRunnerArgs[@]}" -- "${SERVER}" "$@" $EXTRA_ARGS
|
||||
else
|
||||
# If we have a bootstrap.txt file... feed that in to the server stdin
|
||||
if [ -f $bootstrapPath ]; then
|
||||
@@ -604,6 +665,7 @@ else
|
||||
exit
|
||||
fi
|
||||
|
||||
runPreStartScript
|
||||
if isTrue "${DEBUG_EXEC}"; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
+23
-11
@@ -9,23 +9,17 @@ set -e -o pipefail
|
||||
: "${PLUGINS_FILE:=}"
|
||||
: "${REMOVE_OLD_MODS_DEPTH:=1} "
|
||||
: "${REMOVE_OLD_MODS_INCLUDE:=*.jar,*-version.json}"
|
||||
: "${CF_API_KEY_FILE:=}" # Path to file containing CurseForge API key
|
||||
: "${REMOVE_OLD_CONFIGS:=false}"
|
||||
: "${CONFIG_OUT_DIR:=/data/config}"
|
||||
: "${REMOVE_OLD_CONFIGS_DEPTH:=16}"
|
||||
: "${REMOVE_OLD_CONFIGS_INCLUDE:=*}"
|
||||
: "${REMOVE_OLD_CONFIGS_EXCLUDE:=}"
|
||||
: "${CF_USE_HTTP2:=false}" # CF downloads are faster with HTTP 1.1
|
||||
: "${MODRINTH_LOADER:=}"
|
||||
|
||||
# shellcheck source=start-utils
|
||||
. "$(dirname "$0")/start-utils"
|
||||
|
||||
if [[ -n ${CF_API_KEY_FILE} ]]; then
|
||||
if [[ -r "${CF_API_KEY_FILE}" ]]; then
|
||||
CF_API_KEY="$(cat "${CF_API_KEY_FILE}")"
|
||||
export CF_API_KEY
|
||||
else
|
||||
logError "CF_API_KEY_FILE is not readable: ${CF_API_KEY_FILE}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
isDebugging && set -x
|
||||
|
||||
sum_file=/data/.generic_pack.sum
|
||||
@@ -36,6 +30,10 @@ if isTrue "${REMOVE_OLD_MODS}" && [ -z "${MODS_FILE}" ]; then
|
||||
rm -f "$sum_file"
|
||||
fi
|
||||
|
||||
if isTrue "${REMOVE_OLD_CONFIGS}"; then
|
||||
removeOldConfigs "$CONFIG_OUT_DIR"
|
||||
fi
|
||||
|
||||
function handlePackwiz() {
|
||||
# If packwiz url passed, bootstrap packwiz and update mods before other modpack processing
|
||||
if [[ "${PACKWIZ_URL:-}" ]]; then
|
||||
@@ -88,11 +86,13 @@ if [[ "$MODPACK" ]]; then
|
||||
mkdir -p "$PLUGINS_OUT_DIR"
|
||||
if ! unzip -o -d "$PLUGINS_OUT_DIR" /tmp/modpack.zip; then
|
||||
logError "Failed to unzip the modpack from ${MODPACK}"
|
||||
exit 2
|
||||
fi
|
||||
else
|
||||
mkdir -p "$MODS_OUT_DIR"
|
||||
if ! unzip -o -d "$MODS_OUT_DIR" /tmp/modpack.zip; then
|
||||
logError "Failed to unzip the modpack from ${MODPACK}"
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
rm -f /tmp/modpack.zip
|
||||
@@ -342,6 +342,9 @@ function handleCurseForgeFiles() {
|
||||
forge|neoforge|fabric|quilt)
|
||||
args+=(--mod-loader "$TYPE")
|
||||
;;
|
||||
cleanroom)
|
||||
args+=(--mod-loader forge)
|
||||
;;
|
||||
*)
|
||||
if isFamily HYBRID; then
|
||||
# To disambiguate mc-mods we'll assume that hybrid servers
|
||||
@@ -406,4 +409,13 @@ case "X$MODCONFIG" in
|
||||
esac
|
||||
fi
|
||||
|
||||
if isTrue "${APPLY_CLEANROOM}"; then
|
||||
if [[ "$VERSION" != "1.12.2" ]]; then
|
||||
logError "Cleanroom only works with Minecraft version 1.12.2. Current version is $VERSION."
|
||||
exit 1
|
||||
fi
|
||||
# run within the current shell to retain exported environment variables
|
||||
. "$(dirname "$0")/start-applyCleanroom"
|
||||
fi
|
||||
|
||||
exec "$(dirname "$0")/start-setupMounts" "$@"
|
||||
@@ -127,8 +127,14 @@ if [[ "$WORLD" ]] && ( isTrue "${FORCE_WORLD_COPY}" || [ ! -d "$worldDest" ] );
|
||||
if [ "$FAMILY" = "SPIGOT" ]; then
|
||||
# Reorganise if a Spigot server
|
||||
log "Moving End and Nether maps to Spigot location"
|
||||
[ -d "$worldDest/DIM1" ] && mv -f "$worldDest/DIM1" "${worldDest}_the_end"
|
||||
[ -d "$worldDest/DIM-1" ] && mv -f "$worldDest/DIM-1" "${worldDest}_nether"
|
||||
if [ -d "$worldDest/DIM1" ]; then
|
||||
mkdir -p "${worldDest}_the_end"
|
||||
mv -f "$worldDest/DIM1" "${worldDest}_the_end/"
|
||||
fi
|
||||
if [ -d "$worldDest/DIM-1" ]; then
|
||||
mkdir -p "${worldDest}_nether"
|
||||
mv -f "$worldDest/DIM-1" "${worldDest}_nether/"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
+89
-14
@@ -368,9 +368,22 @@ function logRcon() {
|
||||
}
|
||||
|
||||
function normalizeMemSize() {
|
||||
# Convert a JVM-style size (k/m/g) or a percentage of the container memory
|
||||
# limit into bytes. Bash arithmetic is integer-only, so percentages cannot
|
||||
# use a 0.01 scale factor.
|
||||
local input=${1?}
|
||||
local val=${input:0:-1}
|
||||
local scale=1
|
||||
local mem=1
|
||||
case ${1,,} in
|
||||
local mem
|
||||
|
||||
val=${val// /}
|
||||
val=${val%%.*}
|
||||
if ! [[ $val =~ ^[0-9]+$ ]]; then
|
||||
logError "Unable to parse memory size '$input'"
|
||||
return 1
|
||||
fi
|
||||
|
||||
case ${input,,} in
|
||||
*k)
|
||||
scale=1024
|
||||
;;
|
||||
@@ -381,19 +394,25 @@ function normalizeMemSize() {
|
||||
scale=1073741824
|
||||
;;
|
||||
*%)
|
||||
# Get system memory
|
||||
if [ -f "/sys/fs/cgroup/memory/memory.limit_in_bytes" ]; then
|
||||
mem=$( cat /sys/fs/cgroup/memory/memory.limit_in_bytes )
|
||||
elif [ -f "/sys/fs/cgroup/memory.max" ]; then
|
||||
mem=$( cat /sys/fs/cgroup/memory.max )
|
||||
if [ -f /sys/fs/cgroup/memory/memory.limit_in_bytes ]; then
|
||||
mem=$(cat /sys/fs/cgroup/memory/memory.limit_in_bytes)
|
||||
elif [ -f /sys/fs/cgroup/memory.max ]; then
|
||||
mem=$(cat /sys/fs/cgroup/memory.max)
|
||||
fi
|
||||
# Scale is used to transform percentages into decimals (eg. 60 -> 0.6)
|
||||
scale=0.01
|
||||
# cgroup v2 unlimited is "max"; cgroup v1 uses a large sentinel (~2^63).
|
||||
if [[ $mem == max || ! $mem =~ ^[0-9]+$ ]] || (( mem > 1 << 62 )); then
|
||||
mem=$(awk '/MemTotal:/ { print $2 * 1024 }' /proc/meminfo)
|
||||
fi
|
||||
if ! [[ $mem =~ ^[0-9]+$ ]]; then
|
||||
logError "Unable to determine memory limit for percentage value '$input'"
|
||||
return 1
|
||||
fi
|
||||
echo $((val * mem / 100))
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
val=${1:0:-1}
|
||||
echo $((val * scale * mem))
|
||||
echo $((val * scale))
|
||||
}
|
||||
|
||||
function compare_version() {
|
||||
@@ -528,6 +547,23 @@ function removeOldMods {
|
||||
fi
|
||||
}
|
||||
|
||||
function removeOldConfigs {
|
||||
if [ -d "$1" ]; then
|
||||
log "Removing old configs including='${REMOVE_OLD_CONFIGS_INCLUDE}' excluding='${REMOVE_OLD_CONFIGS_EXCLUDE}' up to depth=${REMOVE_OLD_CONFIGS_DEPTH}"
|
||||
args=(
|
||||
--delete
|
||||
--type file
|
||||
--min-depth=1 --max-depth "${REMOVE_OLD_CONFIGS_DEPTH}"
|
||||
--name "${REMOVE_OLD_CONFIGS_INCLUDE}"
|
||||
--exclude-name "${REMOVE_OLD_CONFIGS_EXCLUDE}"
|
||||
)
|
||||
if ! isDebugging; then
|
||||
args+=(--quiet)
|
||||
fi
|
||||
mc-image-helper find "${args[@]}" "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
function get() {
|
||||
mc-image-helper get "$@"
|
||||
}
|
||||
@@ -560,11 +596,21 @@ function isType() {
|
||||
}
|
||||
|
||||
function extract() {
|
||||
src=${1?}
|
||||
destDir=${2?}
|
||||
local src=${1?}
|
||||
local destDir=${2?}
|
||||
shift 2
|
||||
# remaining args are paths within the archive to extract; if none, extract everything
|
||||
# Remaining args are paths within the archive; if none, extract everything.
|
||||
|
||||
# Use modern `mc-image-helper extract archive` if it exists. Standardises extraction logic
|
||||
# and checks if ZipSlips / Path Traversals exist before extraction
|
||||
# Supports ZIP, TAR, TAR.GZ, TAR.BZ2, TAR.ZSTD
|
||||
if mc-image-helper has-feature archive; then
|
||||
mc-image-helper archive extract --overwrite -- "${src}" "${destDir}" "$@"
|
||||
return $?
|
||||
fi
|
||||
|
||||
# Older helper builds, including Java 8, use the shell extraction fallback.
|
||||
local type
|
||||
type=$(file -b --mime-type "${src}")
|
||||
if [[ "$type" == application/octet-stream ]]; then
|
||||
logWarning "Detected non-specific file type $type for $src"
|
||||
@@ -579,12 +625,24 @@ function extract() {
|
||||
|
||||
case "${type}" in
|
||||
application/zip)
|
||||
if unzip -Z1 "${src}" | grep -qE '(^/)|(^\.\./)|(/\.\./)|(/\.\.$)'; then
|
||||
logError "Refusing to extract $src because it contains path traversal entries"
|
||||
return 1
|
||||
fi
|
||||
unzip -o -q -d "${destDir}" "${src}" "$@"
|
||||
;;
|
||||
application/x-tar | application/gzip | application/x-gzip | application/x-bzip2)
|
||||
if tar -tf "${src}" | grep -qE '(^/)|(^\.\./)|(/\.\./)|(/\.\.$)'; then
|
||||
logError "Refusing to extract $src because it contains path traversal entries"
|
||||
return 1
|
||||
fi
|
||||
tar -C "${destDir}" -xf "${src}" "$@"
|
||||
;;
|
||||
application/zstd | application/x-zstd)
|
||||
if tar --use-compress-program=unzstd -tf "${src}" | grep -qE '(^/)|(^\.\./)|(/\.\./)|(/\.\.$)'; then
|
||||
logError "Refusing to extract $src because it contains path traversal entries"
|
||||
return 1
|
||||
fi
|
||||
tar -C "${destDir}" --use-compress-program=unzstd -xf "${src}" "$@"
|
||||
;;
|
||||
*)
|
||||
@@ -598,6 +656,23 @@ function getDistro() {
|
||||
grep -E "^ID=" /etc/os-release | cut -d= -f2 | sed -e 's/"//g'
|
||||
}
|
||||
|
||||
function getJavaRelease() {
|
||||
# Read the major version from the JDK's release file so no JVM has to start;
|
||||
# the helper is the fallback when the file is missing.
|
||||
local version
|
||||
if [[ ${JAVA_HOME:-} && -f "$JAVA_HOME/release" ]]; then
|
||||
version=$(sed -n -e 's/^JAVA_VERSION="\(.*\)"$/\1/p' "$JAVA_HOME/release")
|
||||
# Java 8 and earlier report 1.8.0_312 and so on
|
||||
version=${version#1.}
|
||||
version=${version%%[._-]*}
|
||||
fi
|
||||
if isNumeric "${version:-}"; then
|
||||
echo "$version"
|
||||
else
|
||||
mc-image-helper java-release
|
||||
fi
|
||||
}
|
||||
|
||||
function checkSum() {
|
||||
local sum_file=${1?}
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
services:
|
||||
mc:
|
||||
restart: "no"
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
SETUP_ONLY: "TRUE"
|
||||
TYPE: ARCLIGHT
|
||||
VERSION: "1.21.1"
|
||||
ARCLIGHT_TYPE: "neoforge"
|
||||
ARCLIGHT_RELEASE: "FeudalKings/1.0.0"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
@@ -0,0 +1 @@
|
||||
mc-image-helper assert fileExists "/data/arclight-neoforge-1.21.1-1.0.0-3457560.jar"
|
||||
@@ -0,0 +1,12 @@
|
||||
services:
|
||||
mc:
|
||||
restart: "no"
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
SETUP_ONLY: "TRUE"
|
||||
TYPE: CRUCIBLE
|
||||
VERSION: "1.7.10"
|
||||
CRUCIBLE_RELEASE: "v5.3"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
@@ -0,0 +1,6 @@
|
||||
mc-image-helper assert fileExists "/data/Crucible-1.7.10-5.3.jar"
|
||||
|
||||
if [ ! -d /data/libraries ]; then
|
||||
echo "Expected /data/libraries to have been extracted from libraries.zip"
|
||||
exit 1
|
||||
fi
|
||||
@@ -0,0 +1,12 @@
|
||||
services:
|
||||
mc:
|
||||
restart: "no"
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
SETUP_ONLY: "TRUE"
|
||||
TYPE: KETTING
|
||||
VERSION: "1.20.1"
|
||||
KETTING_RELEASE: "v1.5.1"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
@@ -0,0 +1 @@
|
||||
mc-image-helper assert fileExists "/data/kettinglauncher-*.jar"
|
||||
@@ -0,0 +1,11 @@
|
||||
services:
|
||||
mc:
|
||||
restart: "no"
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
SETUP_ONLY: "TRUE"
|
||||
TYPE: NANOLIMBO
|
||||
NANOLIMBO_RELEASE: "1.13.0"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
@@ -0,0 +1 @@
|
||||
mc-image-helper assert fileExists "/data/NanoLimbo*.jar"
|
||||
@@ -0,0 +1,12 @@
|
||||
services:
|
||||
mc:
|
||||
restart: "no"
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
SETUP_ONLY: "TRUE"
|
||||
TYPE: POSEIDON
|
||||
VERSION: "b1.7.3"
|
||||
POSEIDON_RELEASE: "1.1.12-260720-1033-5303bd5"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
@@ -0,0 +1 @@
|
||||
mc-image-helper assert fileExists "/data/poseidon-craftbukkit-*.jar"
|
||||
@@ -0,0 +1,11 @@
|
||||
services:
|
||||
mc:
|
||||
restart: "no"
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
SETUP_ONLY: "TRUE"
|
||||
TYPE: PUMPKIN
|
||||
PUMPKIN_RELEASE: "0.2.0+26.3-26.51"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
@@ -0,0 +1,7 @@
|
||||
mc-image-helper assert fileExists "/data/pumpkin-*-Linux*"
|
||||
|
||||
actual=$(<"/data/.pumpkin-release")
|
||||
if [[ ${actual} != "0.2.0+26.3-26.51" ]]; then
|
||||
echo "Expected /data/.pumpkin-release to be '0.2.0+26.3-26.51', but was '${actual}'"
|
||||
exit 1
|
||||
fi
|
||||
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
mc:
|
||||
restart: "no"
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
SETUP_ONLY: "TRUE"
|
||||
TYPE: PUMPKIN
|
||||
MOTD: "Pumpkin test MOTD"
|
||||
MAX_PLAYERS: "25"
|
||||
ONLINE_MODE: "false"
|
||||
MODE: "creative"
|
||||
DIFFICULTY: "hard"
|
||||
LEVEL: "myworld"
|
||||
VIEW_DISTANCE: "8"
|
||||
PVP: "false"
|
||||
ENABLE_QUERY: "true"
|
||||
QUERY_PORT: "25566"
|
||||
RCON_PORT: "25576"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
@@ -0,0 +1,29 @@
|
||||
mc-image-helper assert fileExists "/data/pumpkin-*-Linux*"
|
||||
|
||||
pumpkinToml=/data/pumpkin.toml
|
||||
|
||||
assertPathEquals() {
|
||||
local path=$1
|
||||
local expected=$2
|
||||
local actual
|
||||
actual=$(mc-image-helper toml-path --file "${pumpkinToml}" "${path}")
|
||||
if [[ ${actual} != "${expected}" ]]; then
|
||||
echo "Expected ${path} to be '${expected}', but was '${actual}'"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
assertPathEquals '$.networking.java.motd' "Pumpkin test MOTD"
|
||||
assertPathEquals '$.networking.bedrock.motd' "Pumpkin test MOTD"
|
||||
assertPathEquals '$.networking.java.max_players' "25"
|
||||
assertPathEquals '$.networking.bedrock.max_players' "25"
|
||||
assertPathEquals '$.networking.java.online_mode' "false"
|
||||
assertPathEquals '$.networking.bedrock.online_mode' "false"
|
||||
assertPathEquals '$.networking.java.view_distance' "8"
|
||||
assertPathEquals '$.default_gamemode' "Creative"
|
||||
assertPathEquals '$.default_difficulty' "Hard"
|
||||
assertPathEquals '$.default_level_name' "myworld"
|
||||
assertPathEquals '$.pvp.enabled' "false"
|
||||
assertPathEquals '$.networking.query.enabled' "true"
|
||||
assertPathEquals '$.networking.query.address' "0.0.0.0:25566"
|
||||
assertPathEquals '$.networking.rcon.address' "0.0.0.0:25576"
|
||||
Binary file not shown.
@@ -0,0 +1,43 @@
|
||||
services:
|
||||
# copies an existing config into /data before mc starts, so REMOVE_OLD_CONFIGS
|
||||
# has an old config to remove once the modpack config is installed
|
||||
seed:
|
||||
restart: "no"
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
entrypoint: ["bash", "-c", "mkdir -p /data/config && cp /seed/config/stale.txt /data/config/ && chown -R 1000:1000 /data"]
|
||||
volumes:
|
||||
- ./seed:/seed
|
||||
- ./data:/data
|
||||
|
||||
web:
|
||||
image: nginx
|
||||
volumes:
|
||||
- ./configs.zip:/usr/share/nginx/html/configs.zip:ro
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--fail", "http://localhost/configs.zip"]
|
||||
interval: 3s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
mc:
|
||||
restart: "no"
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
depends_on:
|
||||
seed:
|
||||
condition: service_completed_successfully
|
||||
web:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
EULA: "true"
|
||||
SETUP_ONLY: "true"
|
||||
GENERIC_PACKS: http://web/configs.zip
|
||||
REMOVE_OLD_CONFIGS: "true"
|
||||
LOG_TIMESTAMP: "true"
|
||||
# the following are only used to speed up test execution
|
||||
TYPE: CUSTOM
|
||||
CUSTOM_SERVER: /servers/fake.jar
|
||||
VERSION: 1.18.1
|
||||
DEBUG: "true"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
- ./fake.jar:/servers/fake.jar
|
||||
Whitespace-only changes.
@@ -0,0 +1 @@
|
||||
old
|
||||
@@ -0,0 +1,3 @@
|
||||
# verify that the old config was removed and the new one from the pack was installed
|
||||
mc-image-helper assert fileNotExists config/stale.txt
|
||||
mc-image-helper assert fileExists config/opt.yml
|
||||
@@ -0,0 +1,15 @@
|
||||
services:
|
||||
mc:
|
||||
restart: "no"
|
||||
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
|
||||
environment:
|
||||
EULA: "TRUE"
|
||||
SETUP_ONLY: "TRUE"
|
||||
TYPE: "PAPER"
|
||||
WORLD: /worlds/world
|
||||
# the following are only used to speed up test execution
|
||||
VERSION: 1.18.1
|
||||
PAPER_CUSTOM_JAR: /servers/fake.jar
|
||||
volumes:
|
||||
- ./worlds:/worlds:ro
|
||||
- ./data:/data
|
||||
@@ -0,0 +1,3 @@
|
||||
mc-image-helper assert fileExists world/level.dat && \
|
||||
mc-image-helper assert fileExists world_nether/DIM-1/some_nether_file && \
|
||||
mc-image-helper assert fileExists world_the_end/DIM1/some_end_file
|
||||
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Reference in new issue
Block a user