mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-10-13 15:37:12 +00:00
Compare commits
24
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c087d62c3 | ||
|
|
8677b16ff2 | ||
|
|
ece38ad37d | ||
|
|
bb27fd9fef | ||
|
|
2d2d683ef5 | ||
|
|
a1de0d20f7 | ||
|
|
a7583e0477 | ||
|
|
70b3f73ebc | ||
|
|
b3e6608470 | ||
|
|
685024a482 | ||
|
|
8541fa98c2 | ||
|
|
d85a019c57 | ||
|
|
5cb3f0a652 | ||
|
|
b94d51517d | ||
|
|
beed693663 | ||
|
|
770966bf5e | ||
|
|
67d1453ee1 | ||
|
|
7ea3f76d41 | ||
|
|
47130bb030 | ||
|
|
93f5a03995 | ||
|
|
00449564a8 | ||
|
|
b0f2be88cc | ||
|
|
685c16d6dc | ||
|
|
3a682c49f4 |
No files matched your search
@@ -104,16 +104,14 @@ jobs:
|
|||||||
mcHelperVersion: 1.51.4-java8
|
mcHelperVersion: 1.51.4-java8
|
||||||
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
|
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
|
||||||
- variant: java8
|
- variant: java8
|
||||||
baseImage: eclipse-temurin:8u312-b07-jre-focal
|
baseImage: eclipse-temurin:8-jre
|
||||||
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||||
mcVersion: 1.12.2
|
mcVersion: 1.12.2
|
||||||
# Pin version for Java 8, also be sure to set in verify-pr.yml
|
|
||||||
mcHelperVersion: 1.51.4-java8
|
mcHelperVersion: 1.51.4-java8
|
||||||
- variant: java8-jdk
|
- variant: java8-jdk
|
||||||
baseImage: eclipse-temurin:8u312-b07-jdk-focal
|
baseImage: eclipse-temurin:8-jdk
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
mcVersion: 1.12.2
|
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.4-java8
|
||||||
env:
|
env:
|
||||||
# Assume they line up, but when forked change to your Docker Hub username
|
# Assume they line up, but when forked change to your Docker Hub username
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ jobs:
|
|||||||
knockdRepoOrg: Metalcape/knock
|
knockdRepoOrg: Metalcape/knock
|
||||||
# JAVA 8:
|
# JAVA 8:
|
||||||
- variant: java8
|
- 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
|
platforms: linux/amd64
|
||||||
mcVersion: 1.12.2
|
mcVersion: 1.12.2
|
||||||
# For GLIBC_2.34 support
|
# For GLIBC_2.34 support
|
||||||
|
|||||||
+3
-3
@@ -45,19 +45,19 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
|||||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||||
|
|
||||||
# renovate: datasource=github-releases packageName=itzg/mc-monitor
|
# renovate: datasource=github-releases packageName=itzg/mc-monitor
|
||||||
ARG MC_MONITOR_VERSION=0.18.1
|
ARG MC_MONITOR_VERSION=1.18.3
|
||||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||||
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \
|
--var version=${MC_MONITOR_VERSION} --var app=mc-monitor --file {{.app}} \
|
||||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||||
|
|
||||||
# renovate: datasource=github-releases packageName=itzg/mc-server-runner
|
# renovate: datasource=github-releases packageName=itzg/mc-server-runner
|
||||||
ARG MC_SERVER_RUNNER_VERSION=1.16.0
|
ARG MC_SERVER_RUNNER_VERSION=1.16.1
|
||||||
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
|
||||||
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
|
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
|
||||||
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
|
||||||
|
|
||||||
# renovate: datasource=github-releases packageName=itzg/mc-image-helper versioning=loose
|
# renovate: datasource=github-releases packageName=itzg/mc-image-helper versioning=loose
|
||||||
ARG MC_HELPER_VERSION=1.70.0
|
ARG MC_HELPER_VERSION=1.73.0
|
||||||
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
|
ARG MC_HELPER_BASE_URL=${GITHUB_BASEURL}/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}
|
||||||
# used for cache busting local copy of mc-image-helper
|
# used for cache busting local copy of mc-image-helper
|
||||||
ARG MC_HELPER_REV=1
|
ARG MC_HELPER_REV=1
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ apt-get install -y \
|
|||||||
zstd \
|
zstd \
|
||||||
lbzip2 \
|
lbzip2 \
|
||||||
nfs-common \
|
nfs-common \
|
||||||
libpcap0.8 \
|
'libpcap0.8*' \
|
||||||
libnuma1 \
|
libnuma1 \
|
||||||
libcap2-bin \
|
libcap2-bin \
|
||||||
jattach \
|
jattach \
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
### Using the MASH playbook
|
### 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.
|
- 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.
|
- 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.
|
- Enable any supporting services that you might find useful, such as [user authentication](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/authelia.md), [remote backups](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/backup-borg.md), [email relay](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/exim-relay.md), [cron monitoring](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/healthchecks.md), [audio and video conferencing](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/jitsi.md), databases ([MariaDB](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/mariadb.md), [PostgresSQL](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/postgres.md)), [push notifications](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/ntfy.md), [uptime monitoring](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/uptime-kuma.md), [a website](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/wordpress.md), as well as installing any [extra files, folders, applications, services and running commands](https://github.com/mother-of-all-self-hosting/mash-playbook/blob/main/docs/services/auxiliary.md) automatically on deployment.
|
||||||
|
|||||||
@@ -33,3 +33,7 @@ An image that dockerizes [rcon-web-admin](https://github.com/rcon-web-admin/rcon
|
|||||||
### [AutoStopper](https://github.com/Criseda/AutoStopper)
|
### [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.
|
A Velocity plugin that stops idle backend servers and wakes them when players connect, with readiness-aware Docker lifecycle management.
|
||||||
|
|
||||||
|
### [Kobblestone](https://github.com/kobblestoneio/kobblestone)
|
||||||
|
|
||||||
|
A Kubernetes operator for Minecraft that supports custom resource types to manage servers, routers, backups and more.
|
||||||
@@ -22,7 +22,8 @@ Where:
|
|||||||
|
|
||||||
- **Project** is the project slug or ID, see below
|
- **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.
|
- **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`
|
- **Prefix** is `datapack`, `fabric`, `forge`, or `paper`
|
||||||
- The `datapack` prefix is optional when running a vanilla server
|
- 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.
|
- 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
|
!!! tip "Most stable release type"
|
||||||
|
|
||||||
| Description | Example projects entry |
|
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".
|
||||||
|---------------------------------|-------------------------------------------------------|
|
|
||||||
| Select latest version | `fabric-api` |
|
### Examples
|
||||||
| Select specific version | `fabric-api:bQZpGIz0`<br/>`fabric-api:0.119.2+1.21.4` |
|
|
||||||
| Select latest beta version | `fabric-api:beta` |
|
| Description | Example projects entry |
|
||||||
| Latest version using project ID | `P7dR8mSH` |
|
|---------------------------------|-------------------------------------------------------|
|
||||||
| Latest version of datapack | `datapack:terralith` |
|
| Select latest version | `fabric-api` |
|
||||||
| Specific version of datapack | `datapack:terralith:2.5.5` |
|
| Select specific version | `fabric-api:bQZpGIz0`<br/>`fabric-api:0.119.2+1.21.4` |
|
||||||
| Mod loader override | `fabric:fabric-api`<br/>`fabric:fabric-api:bQZpGIz0` |
|
| Select latest beta version | `fabric-api:beta` |
|
||||||
| Projects Listing File | `@/path/to/modrinth-mods.txt` |
|
| Latest version using project ID | `P7dR8mSH` |
|
||||||
|
| Latest version of datapack | `datapack:terralith` |
|
||||||
|
| Specific version of datapack | `datapack:terralith:2.5.5` |
|
||||||
|
| Mod loader override | `fabric:fabric-api`<br/>`fabric:fabric-api:bQZpGIz0` |
|
||||||
|
| Projects Listing File | `@/path/to/modrinth-mods.txt` |
|
||||||
|
|
||||||
### Notes
|
### Notes
|
||||||
|
|
||||||
|
|||||||
@@ -4,22 +4,22 @@ deepmerge==3.0.1
|
|||||||
ghp-import==2.1.0
|
ghp-import==2.1.0
|
||||||
griffe==2.3.0
|
griffe==2.3.0
|
||||||
Jinja2==3.1.6
|
Jinja2==3.1.6
|
||||||
Markdown==3.10.3
|
Markdown==3.11
|
||||||
MarkupSafe==3.0.3
|
MarkupSafe==3.0.4
|
||||||
mergedeep==1.3.4
|
mergedeep==1.3.4
|
||||||
mkdocs==1.6.1
|
mkdocs==1.6.1
|
||||||
mkdocs-autorefs==1.4.4
|
mkdocs-autorefs==1.4.4
|
||||||
mkdocs-get-deps==0.2.2
|
mkdocs-get-deps==0.2.2
|
||||||
mkdocstrings==1.0.6
|
mkdocstrings==1.0.6
|
||||||
mkdocstrings-python==2.0.8
|
mkdocstrings-python==2.0.9
|
||||||
packaging==26.3
|
packaging==26.3
|
||||||
pathspec==1.1.1
|
pathspec==1.1.1
|
||||||
platformdirs==4.11.11
|
platformdirs==4.12.3
|
||||||
Pygments==2.21.0
|
Pygments==2.21.0
|
||||||
pymdown-extensions==12.0.1
|
pymdown-extensions==12.1
|
||||||
python-dateutil==2.9.0.post0
|
python-dateutil==2.9.0.post0
|
||||||
PyYAML==6.0.3
|
PyYAML==6.0.3
|
||||||
pyyaml_env_tag==1.1
|
pyyaml_env_tag==1.1
|
||||||
six==1.17.0
|
six==1.17.0
|
||||||
watchdog==6.0.0
|
watchdog==6.0.0
|
||||||
zensical==0.0.63
|
zensical==0.0.67
|
||||||
@@ -284,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.
|
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
|
||||||
|
|
||||||
Ant-style paths can include the following globbing/wildcard symbols:
|
Ant-style paths can include the following globbing/wildcard symbols:
|
||||||
|
|||||||
@@ -74,3 +74,68 @@ 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
|
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"
|
-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.
|
||||||
|
|
||||||
|
```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 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.
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
mc:
|
mc:
|
||||||
image: itzg/minecraft-server:java8-multiarch
|
image: itzg/minecraft-server:java8
|
||||||
ports:
|
ports:
|
||||||
- "25565:25565"
|
- "25565:25565"
|
||||||
environment:
|
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:
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
services:
|
||||||
|
mc:
|
||||||
|
image: itzg/minecraft-server
|
||||||
|
tty: true
|
||||||
|
stdin_open: true
|
||||||
|
environment:
|
||||||
|
EULA: "true"
|
||||||
|
TYPE: PUMPKIN
|
||||||
|
ports:
|
||||||
|
- "25565:25565"
|
||||||
|
- "19132:19132/udp"
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
restart: unless-stopped
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
mc:
|
mc:
|
||||||
image: itzg/minecraft-server:java8-multiarch
|
image: itzg/minecraft-server:java8
|
||||||
environment:
|
environment:
|
||||||
EULA: true
|
EULA: true
|
||||||
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
MODPACK_PLATFORM: AUTO_CURSEFORGE
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
mc:
|
mc:
|
||||||
image: itzg/minecraft-server:java8-multiarch
|
image: itzg/minecraft-server:java8
|
||||||
volumes:
|
volumes:
|
||||||
- data:/data
|
- data:/data
|
||||||
- ./modpacks:/modpacks:ro
|
- ./modpacks:/modpacks:ro
|
||||||
|
|||||||
@@ -185,6 +185,9 @@
|
|||||||
"beyond-depth": {
|
"beyond-depth": {
|
||||||
"forceIncludes": ["particular-reforged"]
|
"forceIncludes": ["particular-reforged"]
|
||||||
},
|
},
|
||||||
|
"craftoria": {
|
||||||
|
"forceIncludes": ["tmrv"]
|
||||||
|
},
|
||||||
"create-arcane-engineering": {
|
"create-arcane-engineering": {
|
||||||
"forceIncludes": ["just-enough-resources-jer"]
|
"forceIncludes": ["just-enough-resources-jer"]
|
||||||
},
|
},
|
||||||
@@ -203,6 +206,12 @@
|
|||||||
"mob-player-animator"
|
"mob-player-animator"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"nuclear-tech-integrated": {
|
||||||
|
"overridesExclusions": [
|
||||||
|
"mods/custommainmenu-*.jar",
|
||||||
|
"mods/defaultworldgenerator-*.jar"
|
||||||
|
]
|
||||||
|
},
|
||||||
"reclamation-reclaim-the-world": {
|
"reclamation-reclaim-the-world": {
|
||||||
"forceIncludes": [
|
"forceIncludes": [
|
||||||
"more-overlays-updated"
|
"more-overlays-updated"
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -343,6 +343,10 @@ case "${TYPE^^}" in
|
|||||||
exec "$(dirname "$0")/start-deployNanoLimbo" "$@"
|
exec "$(dirname "$0")/start-deployNanoLimbo" "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
PUMPKIN)
|
||||||
|
exec "$(dirname "$0")/start-deployPumpkin" "$@"
|
||||||
|
;;
|
||||||
|
|
||||||
CRUCIBLE)
|
CRUCIBLE)
|
||||||
exec "$(dirname "$0")/start-deployCrucible" "$@"
|
exec "$(dirname "$0")/start-deployCrucible" "$@"
|
||||||
;;
|
;;
|
||||||
@@ -363,7 +367,7 @@ case "${TYPE^^}" in
|
|||||||
logError "Invalid TYPE: '$TYPE'"
|
logError "Invalid TYPE: '$TYPE'"
|
||||||
logError "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FOLIA, PURPUR, FABRIC, QUILT,"
|
logError "Must be: VANILLA, FORGE, BUKKIT, SPIGOT, PAPER, FOLIA, PURPUR, FABRIC, QUILT,"
|
||||||
logError " SPONGEVANILLA, CUSTOM, MAGMA, MOHIST, GTNH, AIRPLANE, PUFFERFISH,"
|
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"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
+34
-23
@@ -4,9 +4,33 @@
|
|||||||
. "$(dirname "$0")/start-utils"
|
. "$(dirname "$0")/start-utils"
|
||||||
|
|
||||||
# Define setup functions
|
# 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(){
|
function getGTNHdownloadPath(){
|
||||||
gtnh_download_path=""
|
gtnh_download_path=""
|
||||||
local release_object=""
|
local release_object=""
|
||||||
|
local log_version_from=""
|
||||||
|
|
||||||
# Select release JSON object
|
# Select release JSON object
|
||||||
# latest-dev will be removed in the future, but is still supported for now.
|
# 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
|
if [ "$GTNH_PACK_VERSION" == "latest-dev" ]; then
|
||||||
logWarning "GTNH_PACK_VERSION=latest-dev is deprecated and will be removed in the future."
|
logWarning "GTNH_PACK_VERSION=latest-dev is deprecated and will be removed in the future."
|
||||||
fi
|
fi
|
||||||
if ! release_object="$(
|
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
|
||||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
log_version_from="latest beta";
|
||||||
| 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."
|
|
||||||
|
|
||||||
elif [ "$GTNH_PACK_VERSION" == "latest" ]; then
|
elif [ "$GTNH_PACK_VERSION" == "latest" ]; then
|
||||||
if ! release_object="$(
|
release_object=$(getGTNHversion '(.versions // .)|to_entries|sort_by(.value.releaseDate)|map(select(.value.title=="Stable release"))|.[-1]') || exit 1
|
||||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
log_version_from="latest";
|
||||||
| 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."
|
|
||||||
|
|
||||||
else
|
else
|
||||||
if ! release_object="$(
|
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
|
||||||
curl -fsSL "https://downloads.gtnewhorizons.com/versions.json" \
|
log_version_from="matching";
|
||||||
| 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."
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $release_object ]]; then
|
if [[ -z $release_object ]]; then
|
||||||
logError "No release found for GTNH_PACK_VERSION=$GTNH_PACK_VERSION. Please check if the version is valid."
|
logError "No release found for GTNH_PACK_VERSION=$GTNH_PACK_VERSION. Please check if the version is valid."
|
||||||
exit 1
|
exit 1
|
||||||
|
else
|
||||||
|
log "Selected \"$(jq -r '.key' <<< "$release_object")\" as ${log_version_from} version for download."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Select compatible server files for java version
|
# Select compatible server files for java version
|
||||||
|
|||||||
Executable
+159
@@ -0,0 +1,159 @@
|
|||||||
|
#!/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
|
||||||
|
|
||||||
|
if isTrue "${FORCE_REDOWNLOAD:-false}"; then
|
||||||
|
log "Forcing re-download of ${pumpkinAsset}"
|
||||||
|
rm -f "/data/${pumpkinAsset}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! SERVER=$(mc-image-helper github download-latest-asset \
|
||||||
|
--output-directory=/data \
|
||||||
|
--name-pattern="^${pumpkinAsset}$" \
|
||||||
|
Pumpkin-MC/Pumpkin
|
||||||
|
); then
|
||||||
|
logError "Failed to download ${pumpkinAsset} from the latest Pumpkin release"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
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" "$@"
|
||||||
+38
-6
@@ -91,7 +91,9 @@ oldState=$(shopt -po xtrace || true)
|
|||||||
shopt -u -o xtrace
|
shopt -u -o xtrace
|
||||||
# Patch Log4j remote code execution vulnerability
|
# Patch Log4j remote code execution vulnerability
|
||||||
# See https://www.minecraft.net/en-us/article/important-message--security-vulnerability-java-edition
|
# 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.
|
: # No patch required here.
|
||||||
elif isFamily VANILLA && versionLessThan 1.12; then
|
elif isFamily VANILLA && versionLessThan 1.12; then
|
||||||
patchLog4jConfig log4j2_17-111.xml https://launcher.mojang.com/v1/objects/dd2b723346a8dcd48e7f4d245f6bf09e98db9696/log4j2_17-111.xml
|
patchLog4jConfig log4j2_17-111.xml https://launcher.mojang.com/v1/objects/dd2b723346a8dcd48e7f4d245f6bf09e98db9696/log4j2_17-111.xml
|
||||||
@@ -111,7 +113,9 @@ if ${useFallbackJvmFlag}; then
|
|||||||
JVM_OPTS="-Dlog4j2.formatMsgNoLookups=true ${JVM_OPTS}"
|
JVM_OPTS="-Dlog4j2.formatMsgNoLookups=true ${JVM_OPTS}"
|
||||||
fi
|
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.
|
: # No patch required here.
|
||||||
elif versionLessThan 1.18.1; then
|
elif versionLessThan 1.18.1; then
|
||||||
if isTrue "${SKIP_LOG4J_PATCHER:-false}"; then
|
if isTrue "${SKIP_LOG4J_PATCHER:-false}"; then
|
||||||
@@ -123,7 +127,9 @@ fi
|
|||||||
|
|
||||||
# Set up log4j2 configuration with templating support
|
# Set up log4j2 configuration with templating support
|
||||||
LOGFILE="${SERVER_DIR}/log4j2.xml"
|
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
|
# Set up log configuration defaults
|
||||||
: "${LOG_LEVEL:=info}"
|
: "${LOG_LEVEL:=info}"
|
||||||
: "${ROLLING_LOG_MAX_FILES:=1000}"
|
: "${ROLLING_LOG_MAX_FILES:=1000}"
|
||||||
@@ -195,12 +201,12 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Optional disable console
|
# Optional disable console
|
||||||
if versionLessThan 1.14 && [[ ${CONSOLE,,} = false ]]; then
|
if ! isFamily NATIVE && versionLessThan 1.14 && [[ ${CONSOLE,,} = false ]]; then
|
||||||
EXTRA_ARGS+=" --noconsole"
|
EXTRA_ARGS+=" --noconsole"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Optional disable GUI for headless servers
|
# Optional disable GUI for headless servers
|
||||||
if [[ ${GUI,,} = false ]]; then
|
if ! isFamily NATIVE && [[ ${GUI,,} = false ]]; then
|
||||||
EXTRA_ARGS+=" nogui"
|
EXTRA_ARGS+=" nogui"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -472,7 +478,10 @@ function copyFilesForCurseForge() {
|
|||||||
cp -f ${baseDataDir}/eula.txt "${FTB_DIR}/"
|
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 "
|
echo "
|
||||||
DISABLE_HEALTHCHECK=true
|
DISABLE_HEALTHCHECK=true
|
||||||
" > "$mcHealthEnvPath"
|
" > "$mcHealthEnvPath"
|
||||||
@@ -601,6 +610,29 @@ elif [[ $SERVER =~ run.sh ]]; then
|
|||||||
set -x
|
set -x
|
||||||
fi
|
fi
|
||||||
exec ${SERVER_RUNNER} "${mcServerRunnerArgs[@]}" --shell bash -- "${SERVER}" $EXTRA_ARGS
|
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
|
else
|
||||||
# If we have a bootstrap.txt file... feed that in to the server stdin
|
# If we have a bootstrap.txt file... feed that in to the server stdin
|
||||||
if [ -f $bootstrapPath ]; then
|
if [ -f $bootstrapPath ]; then
|
||||||
|
|||||||
+13
-3
@@ -596,11 +596,21 @@ function isType() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function extract() {
|
function extract() {
|
||||||
src=${1?}
|
local src=${1?}
|
||||||
destDir=${2?}
|
local destDir=${2?}
|
||||||
shift 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}")
|
type=$(file -b --mime-type "${src}")
|
||||||
if [[ "$type" == application/octet-stream ]]; then
|
if [[ "$type" == application/octet-stream ]]; then
|
||||||
logWarning "Detected non-specific file type $type for $src"
|
logWarning "Detected non-specific file type $type for $src"
|
||||||
|
|||||||
@@ -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"
|
||||||
Reference in new issue
Block a user