Compare commits

...

32 Commits

Author SHA1 Message Date
Geoff Bourne
6ee414337a Update Forge promotions URL (#3584) 2025-08-03 07:56:12 -05:00
Geoff Bourne
c2071e5038 Add VERSION_FROM_MODRINTH_PROJECTS (#3580) 2025-08-02 19:01:49 -05:00
dependabot[bot]
02640e5414 build(deps): bump the patches group in /docs with 2 updates (#3572) 2025-07-28 10:31:53 -06:00
Geoff Bourne
ac806b756c modrinth: prioritize target loader when resolving project versions (#3570) 2025-07-26 19:48:37 -06:00
Geoff Bourne
605e2ea993 Upgrade dev mkdocs to Python 3.11 (#3569) 2025-07-24 12:49:36 -06:00
Navio1430
c9dd6dc72c update NanoLimbo repository name (#3564) 2025-07-20 07:16:42 -05:00
bobo
d8bca85d55 cf + modrinth: exclude config-menus-forge & welcome-screen (#3561)
Co-authored-by: Geoff Bourne <itzgeoff@gmail.com>
2025-07-20 07:16:17 -05:00
Geoff Bourne
3acc867f58 cf: exclude fastquit (#3555) 2025-07-19 06:56:47 -05:00
Geoff Bourne
8463893168 fabric: add option to force reinstall (#3559) 2025-07-19 06:55:03 -05:00
Michel Suárez
5b79daa4a3 Fix pufferfish url script (#3553) 2025-07-15 06:55:22 -05:00
Graham Keeth
1fd1e15f3c Docs: fix env var for enabling query (#3552) 2025-07-13 10:40:24 -05:00
Fewwan
37e08466ad Add support for accepts-transfers and rate-limit server properties (#3550) 2025-07-10 19:04:02 -05:00
mykokhehiehieh
1868cd05da docs: fix incorrect Minecraft version link (#3549) 2025-07-10 11:04:25 -05:00
Geoff Bourne
8a7cfbfb3e Switch PAPER_CONFIG_DEFAULTS_REPO to https://github.com/Shonz1/minecraft-default-configs (#3541) 2025-07-08 20:02:43 -05:00
Geoff Bourne
e31a730d21 Revert "Add GuideME to exclude list" (#3546) 2025-07-08 07:20:25 -05:00
Geoff Bourne
a36a75a790 Excluding BetterGrassify and Distration Free Recipes (#3544) 2025-07-07 20:54:56 -05:00
dependabot[bot]
07b10027af build(deps): bump mkdocs-material from 9.6.14 to 9.6.15 in /docs in the patches group (#3542) 2025-07-07 07:28:24 -05:00
Geoff Bourne
c72e23b4d7 Add a MOTD example with placeholders (#3540) 2025-07-06 20:43:38 -05:00
Geoff Bourne
5036ef5f2f Move page about building image out of contributing section (#3538) 2025-07-06 10:36:28 -05:00
Geoff Bourne
37e956e517 Quieter Paper/Bukkit default configs downloading (#3535) 2025-07-05 11:35:01 -05:00
Caitlyn Williams
36015d2b39 Add GuideME to exclude list (#3534) 2025-07-05 11:34:17 -05:00
Geoff Bourne
a3ac903dfe Add particle effects to CF global excludes (#3532) 2025-07-04 13:36:58 -05:00
Geoff Bourne
6e94f4234b Add back java16 variant for Paper 1.16.5 Also - remove non-JRE java8 variants to offset extra builds (#3531) 2025-07-04 12:05:54 -05:00
Geoff Bourne
9d8ab63ee5 build: add back java11 for 1.16.5 (#3530) 2025-07-04 11:29:43 -05:00
Geoff Bourne
cde239f033 cf: retry file download when Netty channel/timeout exceptions (#3529) 2025-07-04 11:00:47 -05:00
Geoff Bourne
8bc184cd18 cf: retry file downloads on premature close error (#3528) 2025-07-04 09:47:01 -05:00
Geoff Bourne
3cdc86ef0b When using a custom server, allow specifying MODRINTH_LOADER with MODRINTH_PROJECTS (#3527) 2025-07-02 22:25:04 -05:00
Geoff Bourne
45f14512bb Added packwiz example (#3523) 2025-06-30 16:43:21 -05:00
Geoff Bourne
d402403876 Adjusted wording and example for generator settings (#3522) 2025-06-30 13:29:30 -05:00
Geoff Bourne
9ebae54e6e Clarified docker attach usage for compose vs non-compose (#3521) 2025-06-30 12:25:47 -05:00
Geoff Bourne
19a8bcfb53 Note native auto-pause support (#3520) 2025-06-29 17:47:12 -05:00
Geoff Bourne
c700880bbe Use Paper's Fill v3 download API (#3519) 2025-06-28 19:34:26 -05:00
31 changed files with 330 additions and 262 deletions

View File

@@ -29,6 +29,8 @@ jobs:
- java17 - java17
- java17-graalvm - java17-graalvm
- java17-alpine - java17-alpine
- java16
- java11
- java8 - java8
- java8-graalvm-ce - java8-graalvm-ce
- java8-openj9 - java8-openj9
@@ -74,31 +76,41 @@ jobs:
baseImage: eclipse-temurin:17-jre-alpine baseImage: eclipse-temurin:17-jre-alpine
platforms: linux/amd64 platforms: linux/amd64
mcVersion: 1.20.4 mcVersion: 1.20.4
# JAVA 16
- variant: java16
baseImage: adoptopenjdk:16-jre-hotspot
platforms: linux/amd64,linux/arm/v7,linux/arm64
mcVersion: 1.16.5
# JAVA 11
- variant: java11
baseImage: adoptopenjdk:11-jre-hotspot
platforms: linux/amd64,linux/arm/v7,linux/arm64
mcVersion: 1.16.4
# JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies # JAVA 8: NOTE: Unable to go past 8u312 because of Forge dependencies
- variant: java8 - variant: java8
baseImage: eclipse-temurin:8u312-b07-jre-focal baseImage: eclipse-temurin:8u312-b07-jre-focal
platforms: linux/amd64,linux/arm/v7,linux/arm64 platforms: linux/amd64,linux/arm/v7,linux/arm64
mcVersion: 1.12.2 mcVersion: 1.12.2
# Pin version for Java 8 # Pin version for Java 8
mcHelperVersion: 1.42.1 # mcHelperVersion: 1.46.0
- variant: java8-graalvm-ce - variant: java8-graalvm-ce
baseImage: ghcr.io/graalvm/graalvm-ce:java8 baseImage: ghcr.io/graalvm/graalvm-ce:java8
platforms: linux/amd64 platforms: linux/amd64
mcVersion: 1.12.2 mcVersion: 1.12.2
# Pin version for Java 8 # Pin version for Java 8
mcHelperVersion: 1.42.1 # mcHelperVersion: 1.46.0
- variant: java8-jdk - variant: java8-jdk
baseImage: eclipse-temurin:8u312-b07-jdk-focal baseImage: eclipse-temurin:8u312-b07-jdk-focal
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
mcVersion: 1.12.2 mcVersion: 1.12.2
# Pin version for Java 8 # Pin version for Java 8
mcHelperVersion: 1.42.1 # mcHelperVersion: 1.46.0
- variant: java8-openj9 - variant: java8-openj9
baseImage: ibm-semeru-runtimes:open-8u312-b07-jre baseImage: ibm-semeru-runtimes:open-8u312-b07-jre
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
mcVersion: 1.12.2 mcVersion: 1.12.2
# Pin version for Java 8 # Pin version for Java 8
mcHelperVersion: 1.42.1 # mcHelperVersion: 1.46.0
env: env:
IMAGE_TO_TEST: "${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}" IMAGE_TO_TEST: "${{ github.repository_owner }}/minecraft-server:test-${{ matrix.variant }}-${{ github.run_id }}"
HAS_IMAGE_REPO_ACCESS: ${{ secrets.DOCKER_USER != '' && secrets.DOCKER_PASSWORD != '' }} HAS_IMAGE_REPO_ACCESS: ${{ secrets.DOCKER_USER != '' && secrets.DOCKER_PASSWORD != '' }}

View File

@@ -48,7 +48,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \ --var version=${MC_SERVER_RUNNER_VERSION} --var app=mc-server-runner --file {{.app}} \
--from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz --from ${GITHUB_BASEURL}/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_HELPER_VERSION=1.45.0 ARG MC_HELPER_VERSION=1.48.1
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

View File

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

View File

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

View File

@@ -84,9 +84,19 @@ To produce a multi-line MOTD, embed a newline character as `\n` in the string, s
# MOTD: "line one\nline two" # MOTD: "line one\nline two"
``` ```
!!! tip The following example combines a multi-line MOTD with [placeholders](#placeholders) from the latest version of the installed modpack:
You can also embed configured and resolved environment variables using [placeholders](#placeholders). !!! example
```yaml
MOD_PLATFORM: AUTO_CURSEFORGE
CF_SLUG: craftoria
MOTD: |
A %TYPE% server on %VERSION%
running %MODPACK_NAME% %MODPACK_VERSION%
```
![](../img/motd-with-placeholders.png)
### Difficulty ### Difficulty
@@ -246,125 +256,26 @@ By default, the server listens for RCON on port 25575 within the container. It c
### Query ### Query
Enabling this will enable the gamespy query protocol. Set the environment variable `ENABLE_QUERY` to "true" to enable the gamespy query protocol. Maps to the server property [enable-query](https://minecraft.wiki/w/Server.properties#enable-query). By default, the query port will be `25565` (UDP) but can be changed with the `QUERY_PORT` environment variable.
By default the query port will be `25565` (UDP) but can easily be changed with the `QUERY_PORT` variable.
docker run -d -e ENABLE_QUERY=true
### Max players
By default max players is 20, you can increase this with the `MAX_PLAYERS` variable.
docker run -d -e MAX_PLAYERS=50
### Max world size
This sets the maximum possible size in blocks, expressed as a radius, that the world border can obtain.
docker run -d -e MAX_WORLD_SIZE=10000
### Allow Nether
Allows players to travel to the Nether.
docker run -d -e ALLOW_NETHER=true
### Announce Player Achievements
Allows server to announce when a player gets an achievement.
docker run -d -e ANNOUNCE_PLAYER_ACHIEVEMENTS=true
### Enable Command Block
Enables command blocks
docker run -d -e ENABLE_COMMAND_BLOCK=true
### Force Gamemode
Force players to join in the default game mode.
- false - Players will join in the gamemode they left in.
- true - Players will always join in the default gamemode.
`docker run -d -e FORCE_GAMEMODE=false`
### Generate Structures
Defines whether structures (such as villages) will be generated.
- false - Structures will not be generated in new chunks.
- true - Structures will be generated in new chunks.
`docker run -d -e GENERATE_STRUCTURES=true`
### Hardcore
If set to true, players will be set to spectator mode if they die.
docker run -d -e HARDCORE=false
### Snooper
If set to false, the server will not send data to snoop.minecraft.net server.
docker run -d -e SNOOPER_ENABLED=false
### Max Build Height
The maximum height in which building is allowed.
Terrain may still naturally generate above a low height limit.
docker run -d -e MAX_BUILD_HEIGHT=256
### Max Tick Time
The maximum number of milliseconds a single tick may take before the server watchdog stops the server with the message, A single server tick took 60.00 seconds (should be max 0.05); Considering it to be crashed, server will forcibly shutdown. Once this criteria is met, it calls System.exit(1).
Setting this to -1 will disable watchdog entirely
docker run -d -e MAX_TICK_TIME=60000
### Spawn Animals
Determines if animals will be able to spawn.
docker run -d -e SPAWN_ANIMALS=true
### Spawn Monsters
Determines if monsters will be spawned.
docker run -d -e SPAWN_MONSTERS=true
### Spawn NPCs
Determines if villagers will be spawned.
docker run -d -e SPAWN_NPCS=true
### Set spawn protection
Sets the area that non-ops can not edit (0 to disable)
docker run -d -e SPAWN_PROTECTION=0
### View Distance
Sets the amount of world data the server sends the client, measured in chunks in each direction of the player (radius, not diameter).
It determines the server-side viewing distance.
docker run -d -e VIEW_DISTANCE=10
### Level Seed ### Level Seed
If you want to create the Minecraft level with a specific seed, use `SEED`, such as If you want to create the Minecraft level with a specific seed, set the environment variable `SEED`, which maps to the [level-seed](https://minecraft.wiki/w/Server.properties#level-seed) property.
-e SEED=1785852800490497919
If using a negative value for the seed, make sure to quote the value such as: If using a negative value for the seed, make sure to quote the value such as:
!!! example "Using docker run"
```
-e SEED="-1785852800490497919" -e SEED="-1785852800490497919"
```
!!! example "Using compose"
```yaml
environment:
SEED: "-1785852800490497919"
```
### Game Mode ### Game Mode
@@ -382,13 +293,6 @@ For example:
docker run -d -e MODE=creative ... docker run -d -e MODE=creative ...
### PVP Mode
By default, servers are created with player-vs-player (PVP) mode enabled. You can disable this with the `PVP`
environment variable set to `false`, such as
docker run -d -e PVP=false ...
### Level Type and Generator Settings ### Level Type and Generator Settings
By default, a standard world is generated with hills, valleys, water, etc. A different level type can By default, a standard world is generated with hills, valleys, water, etc. A different level type can
@@ -408,29 +312,28 @@ Example for a superflat world:
- Desert biome - Desert biome
```yaml ```yaml
LEVEL_TYPE: FLAT environment:
GENERATOR_SETTINGS: >-4 LEVEL_TYPE: FLAT
{ GENERATOR_SETTINGS: >-
"layers": [ {
{ "layers": [
"block": "minecraft:bedrock", {
"height": 1 "block": "minecraft:bedrock",
}, "height": 1
{ },
"block": "minecraft:stone", {
"height": 2 "block": "minecraft:stone",
}, "height": 2
{ },
"block": "minecraft:sandstone", {
"height": 15 "block": "minecraft:sandstone",
} "height": 15
], }
"biome": "minecraft:desert" ],
} "biome": "minecraft:desert"
}
``` ```
For more details, check the [official wiki](https://minecraft.wiki/w/Java_Edition_level_format#generatorOptions_tag_format). For more details, refer to the Minecraft Wiki sections for [Superflat Multiplayer](https://minecraft.wiki/w/Superflat#Multiplayer) and [generator options tag format](https://minecraft.wiki/w/Java_Edition_level_format#generatorOptions_tag_format).
### Custom Server Resource Pack ### Custom Server Resource Pack
@@ -452,31 +355,24 @@ where the default is "world":
> **INFO** Refer to the [data directory](../data-directory.md) section for a visual description of where the `$LEVEL` directory is situated. > **INFO** Refer to the [data directory](../data-directory.md) section for a visual description of where the `$LEVEL` directory is situated.
### Online mode
By default, server checks connecting players against Minecraft's account database. If you want to create an offline server or your server is not connected to the internet, you can disable the server to try connecting to minecraft.net to authenticate players with environment variable `ONLINE_MODE`, like this
docker run -d -e ONLINE_MODE=FALSE ...
### Allow flight
Allows users to use flight on your server while in Survival mode, if they have a mod that provides flight installed.
-e ALLOW_FLIGHT=TRUE|FALSE
### Server name
The server name (e.g. for bungeecord) can be set like:
docker run -d -e SERVER_NAME=MyServer ...
### Server port ### Server port
> **WARNING:** only change this value if you know what you're doing. It is only needed when using host networking and it is rare that host networking should be used. Use `-p` port mappings instead. > **WARNING:** only change this value if you know what you're doing. It only needs to be changed when using host-networking and it is rare that host networking should be used. Use `-p` port mappings instead.
If you must, the server port can be set like: If you must, the server port can be set like:
!!! example "Using docker run"
```
docker run -d -e SERVER_PORT=25566 ... docker run -d -e SERVER_PORT=25566 ...
```
!!! example "Using compose"
```yaml
environment:
SERVER_PORT: 25566
```
**however**, be sure to change your port mapping accordingly and be prepared for some features to break. **however**, be sure to change your port mapping accordingly and be prepared for some features to break.
@@ -500,26 +396,43 @@ When using `docker run` from a bash shell, the entries must be quoted with the `
### Other server property mappings ### Other server property mappings
| Environment Variable | Server Property | | Environment Variable | Server Property |
|-----------------------------------|-----------------------------------| |-----------------------------------|-------------------------------------------------------------------------------------------------------------------|
| BROADCAST_CONSOLE_TO_OPS | broadcast-console-to-ops | | ACCEPTS_TRANSFERS | [accepts-transfers](https://minecraft.wiki/w/Server.properties#accepts-transfers) |
| BROADCAST_RCON_TO_OPS | broadcast-rcon-to-ops | | ALLOW_FLIGHT | [allow-flight](https://minecraft.wiki/w/Server.properties#allow-flight) |
| ENABLE_STATUS | enable-status | | ALLOW_NETHER | [allow-nether](https://minecraft.wiki/w/Server.properties#allow-nether) |
| ENFORCE_SECURE_PROFILE | enforce-secure-profile | | BROADCAST_CONSOLE_TO_OPS | [broadcast-console-to-ops](https://minecraft.wiki/w/Server.properties#broadcast-console-to-ops) |
| ENTITY_BROADCAST_RANGE_PERCENTAGE | entity-broadcast-range-percentage | | BROADCAST_RCON_TO_OPS | [broadcast-rcon-to-ops](https://minecraft.wiki/w/Server.properties#broadcast-rcon-to-ops) |
| FUNCTION_PERMISSION_LEVEL | function-permission-level | | BUG_REPORT_LINK | [bug-report-link](https://minecraft.wiki/w/Server.properties#bug-report-link) |
| NETWORK_COMPRESSION_THRESHOLD | network-compression-threshold | | ENABLE_COMMAND_BLOCK | [enable-command-block](https://minecraft.wiki/w/Server.properties#enable-command-block) |
| OP_PERMISSION_LEVEL | op-permission-level | | ENABLE_STATUS | [enable-status](https://minecraft.wiki/w/Server.properties#enable-status) |
| PLAYER_IDLE_TIMEOUT | player-idle-timeout | | ENFORCE_SECURE_PROFILE | [enforce-secure-profile](https://minecraft.wiki/w/Server.properties#enforce-secure-profile) |
| PREVENT_PROXY_CONNECTIONS | prevent-proxy-connections | | ENTITY_BROADCAST_RANGE_PERCENTAGE | [entity-broadcast-range-percentage](https://minecraft.wiki/w/Server.properties#entity-broadcast-range-percentage) |
| SIMULATION_DISTANCE | simulation-distance | | FORCE_GAMEMODE | [force-gamemode](https://minecraft.wiki/w/Server.properties#force-gamemode) |
| SYNC_CHUNK_WRITES | sync-chunk-writes | | FUNCTION_PERMISSION_LEVEL | [function-permission-level](https://minecraft.wiki/w/Server.properties#function-permission-level) |
| USE_NATIVE_TRANSPORT | use-native-transport | | GENERATE_STRUCTURES | [generate-structures](https://minecraft.wiki/w/Server.properties#generate-structures) |
| HIDE_ONLINE_PLAYERS | hide-online-players | | HARDCORE | [hardcore](https://minecraft.wiki/w/Server.properties#hardcore) |
| RESOURCE_PACK_ID | resource-pack-id | | HIDE_ONLINE_PLAYERS | [hide-online-players](https://minecraft.wiki/w/Server.properties#hide-online-players) |
| RESOURCE_PACK_PROMPT | resource-pack-prompt | | LOG_IPS | [log-ips](https://minecraft.wiki/w/Server.properties#log-ips) |
| MAX_CHAINED_NEIGHBOR_UPDATES | max-chained-neighbor-updates | | MAX_CHAINED_NEIGHBOR_UPDATES | [max-chained-neighbor-updates](https://minecraft.wiki/w/Server.properties#max-chained-neighbor-updates) |
| LOG_IPS | log-ips | | MAX_PLAYERS | [max-players](https://minecraft.wiki/w/Server.properties#max-players) |
| REGION_FILE_COMPRESSION | region-file-compression | | MAX_TICK_TIME | [max-tick-time](https://minecraft.wiki/w/Server.properties#max-tick-time) |
| BUG_REPORT_LINK | bug-report-link | | MAX_WORLD_SIZE | [max-world-size](https://minecraft.wiki/w/Server.properties#max-world-size) |
| PAUSE_WHEN_EMPTY_SECONDS | pause-when-empty-seconds | | NETWORK_COMPRESSION_THRESHOLD | [network-compression-threshold](https://minecraft.wiki/w/Server.properties#network-compression-threshold) |
| ONLINE_MODE | [online-mode](https://minecraft.wiki/w/Server.properties#online-mode) |
| OP_PERMISSION_LEVEL | [op-permission-level](https://minecraft.wiki/w/Server.properties#op-permission-level) |
| PAUSE_WHEN_EMPTY_SECONDS | [pause-when-empty-seconds](https://minecraft.wiki/w/Server.properties#pause-when-empty-seconds) |
| PLAYER_IDLE_TIMEOUT | [player-idle-timeout](https://minecraft.wiki/w/Server.properties#player-idle-timeout) |
| PREVENT_PROXY_CONNECTIONS | [prevent-proxy-connections](https://minecraft.wiki/w/Server.properties#prevent-proxy-connections) |
| PVP | [pvp](https://minecraft.wiki/w/Server.properties#pvp) |
| RATE_LIMIT | [rate-limit](https://minecraft.wiki/w/Server.properties#rate-limit) |
| REGION_FILE_COMPRESSION | [region-file-compression](https://minecraft.wiki/w/Server.properties#region-file-compression) |
| RESOURCE_PACK_ID | [resource-pack-id](https://minecraft.wiki/w/Server.properties#resource-pack-id) |
| RESOURCE_PACK_PROMPT | [resource-pack-prompt](https://minecraft.wiki/w/Server.properties#resource-pack-prompt) |
| SERVER_NAME | [server-name](https://minecraft.wiki/w/Server.properties#server-name) |
| SIMULATION_DISTANCE | [simulation-distance](https://minecraft.wiki/w/Server.properties#simulation-distance) |
| SPAWN_MONSTERS | [spawn-monsters](https://minecraft.wiki/w/Server.properties#spawn-monsters) |
| SPAWN_PROTECTION | [spawn-protection](https://minecraft.wiki/w/Server.properties#spawn-protection) |
| SYNC_CHUNK_WRITES | [sync-chunk-writes](https://minecraft.wiki/w/Server.properties#sync-chunk-writes) |
| USE_NATIVE_TRANSPORT | [use-native-transport](https://minecraft.wiki/w/Server.properties#use-native-transport) |
| VIEW_DISTANCE | [view-distance](https://minecraft.wiki/w/Server.properties#view-distance) |

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

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

View File

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

View File

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

View File

@@ -42,6 +42,25 @@
datapack:terralith datapack:terralith
``` ```
## Version from Projects
When the environment variable `VERSION_FROM_MODRINTH_PROJECTS` is set to "true" the Minecraft [`VERSION`](../versions/minecraft.md) will be automatically determined by looking at the most recent version of Minecraft that is supported by all the projects provided in `MODRINTH_PROJECTS`.
!!! example
Given the environment variables
```yaml
MODRINTH_PROJECTS: |
viaversion
viabackwards
griefprevention
discordsrv
VERSION_FROM_MODRINTH_PROJECTS: true
```
Let's say all are supported on Minecraft up to 1.21.8 except griefprevention, which is only supported up to 1.21.7. In that case, `VERSION` will be automatically set to 1.21.7.
## Extra options ## Extra options
`MODRINTH_DOWNLOAD_DEPENDENCIES` `MODRINTH_DOWNLOAD_DEPENDENCIES`
@@ -50,3 +69,6 @@
`MODRINTH_ALLOWED_VERSION_TYPE` `MODRINTH_ALLOWED_VERSION_TYPE`
: The version type is used to determine the newest version to use from each project. The allowed values are `release` (default), `beta`, `alpha`. Setting to `beta` will pick up both release and beta versions. Setting to `alpha` will pick up release, beta, and alpha versions. : The version type is used to determine the newest version to use from each project. The allowed values are `release` (default), `beta`, `alpha`. Setting to `beta` will pick up both release and beta versions. Setting to `alpha` will pick up release, beta, and alpha versions.
`MODRINTH_LOADER`
: When using a custom server, set this to specify which loader type will be requested during lookups

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -18,6 +18,7 @@
"better-tips-nbt-tag", "better-tips-nbt-tag",
"betterf3", "betterf3",
"betterfps", "betterfps",
"bettergrassify",
"biomeinfo", "biomeinfo",
"block-drops-jei-addon", "block-drops-jei-addon",
"blur-forge", "blur-forge",
@@ -27,6 +28,7 @@
"chunk-animator", "chunk-animator",
"clickable-advancements", "clickable-advancements",
"compass-coords", "compass-coords",
"config-menus-forge",
"configured", "configured",
"controllable", "controllable",
"controlling", "controlling",
@@ -36,6 +38,7 @@
"dark-mode-everywhere", "dark-mode-everywhere",
"defensive-measures", "defensive-measures",
"ding", "ding",
"distraction-free-recipes",
"drippy-loading-screen", "drippy-loading-screen",
"dynamic-surroundings", "dynamic-surroundings",
"dynamic-view", "dynamic-view",
@@ -62,6 +65,8 @@
"fancymenu", "fancymenu",
"farsight", "farsight",
"faster-ladder-climbing", "faster-ladder-climbing",
"fastquit",
"fastquit-forge",
"flerovium", "flerovium",
"foamfix-optimization-mod", "foamfix-optimization-mod",
"forgeskyboxes", "forgeskyboxes",
@@ -107,6 +112,8 @@
"overloaded-armor-bar", "overloaded-armor-bar",
"packmenu", "packmenu",
"packmodemenu", "packmodemenu",
"particle-effects",
"particle-effects-reforged",
"particular", "particular",
"particular-reforged", "particular-reforged",
"reauth", "reauth",
@@ -152,6 +159,7 @@
"waila-harvestability", "waila-harvestability",
"wakes-reforged", "wakes-reforged",
"wawla", "wawla",
"welcome-screen",
"xaeroplus", "xaeroplus",
"yungs-menu-tweaks", "yungs-menu-tweaks",
"zume" "zume"

View File

@@ -10,6 +10,7 @@
"axolotlbuckets", "axolotlbuckets",
"BadOptimizations", "BadOptimizations",
"BetterAdvancements", "BetterAdvancements",
"BetterGrassify",
"betterbeds", "betterbeds",
"BetterThirdPerson", "BetterThirdPerson",
"BHMenu", "BHMenu",
@@ -25,9 +26,11 @@
"compass-coords", "compass-coords",
"connectedness", "connectedness",
"connector", "connector",
"continuity",
"craftpresence", "craftpresence",
"cwb", "cwb",
"DisableCustomWorldsAdvice", "DisableCustomWorldsAdvice",
"distraction_free_recipes",
"drippyloadingscreen", "drippyloadingscreen",
"eating-animation", "eating-animation",
"emiffect", "emiffect",
@@ -39,9 +42,11 @@
"fallingleaves", "fallingleaves",
"fancymenu", "fancymenu",
"fast-ip-ping", "fast-ip-ping",
"fastquit",
"FauxCustomEntityData", "FauxCustomEntityData",
"feytweaks", "feytweaks",
"figura", "figura",
"ForgeConfigScreens",
"GeckoLibIrisCompat", "GeckoLibIrisCompat",
"gpumemleakfix", "gpumemleakfix",
"Highlighter", "Highlighter",
@@ -79,6 +84,7 @@
"sorted_enchantments", "sorted_enchantments",
"visuality", "visuality",
"VR-Combat", "VR-Combat",
"welcomescreen",
"YeetusExperimentus", "YeetusExperimentus",
"yungsmenutweaks", "yungsmenutweaks",
"Zoomify", "Zoomify",

View File

@@ -1,10 +1,11 @@
{ {
"accepts-transfers": {"env": "ACCEPTS_TRANSFERS"},
"allow-flight": {"env": "ALLOW_FLIGHT"}, "allow-flight": {"env": "ALLOW_FLIGHT"},
"allow-nether": {"env": "ALLOW_NETHER"}, "allow-nether": {"env": "ALLOW_NETHER"},
"bug-report-link": {"env": "BUG_REPORT_LINK"},
"announce-player-achievements": {"env": "ANNOUNCE_PLAYER_ACHIEVEMENTS"}, "announce-player-achievements": {"env": "ANNOUNCE_PLAYER_ACHIEVEMENTS"},
"broadcast-console-to-ops": {"env": "BROADCAST_CONSOLE_TO_OPS"}, "broadcast-console-to-ops": {"env": "BROADCAST_CONSOLE_TO_OPS"},
"broadcast-rcon-to-ops": {"env": "BROADCAST_RCON_TO_OPS"}, "broadcast-rcon-to-ops": {"env": "BROADCAST_RCON_TO_OPS"},
"bug-report-link": {"env": "BUG_REPORT_LINK"},
"difficulty": {"env": "DIFFICULTY"}, "difficulty": {"env": "DIFFICULTY"},
"enable-command-block": {"env": "ENABLE_COMMAND_BLOCK"}, "enable-command-block": {"env": "ENABLE_COMMAND_BLOCK"},
"enable-jmx-monitoring": {"env": "ENABLE_JMX"}, "enable-jmx-monitoring": {"env": "ENABLE_JMX"},
@@ -42,14 +43,15 @@
"previews-chat": {"env": "PREVIEWS_CHAT"}, "previews-chat": {"env": "PREVIEWS_CHAT"},
"pvp": {"env": "PVP"}, "pvp": {"env": "PVP"},
"query.port": {"env": "QUERY_PORT"}, "query.port": {"env": "QUERY_PORT"},
"rate-limit": {"env": "RATE_LIMIT"},
"rcon.password": {"env": "RCON_PASSWORD"}, "rcon.password": {"env": "RCON_PASSWORD"},
"rcon.port": {"env": "RCON_PORT"}, "rcon.port": {"env": "RCON_PORT"},
"region-file-compression": {"env": "REGION_FILE_COMPRESSION"}, "region-file-compression": {"env": "REGION_FILE_COMPRESSION"},
"resource-pack": {"env": "RESOURCE_PACK"}, "require-resource-pack": {"env": "RESOURCE_PACK_ENFORCE"},
"resource-pack-id": {"env": "RESOURCE_PACK_ID"}, "resource-pack-id": {"env": "RESOURCE_PACK_ID"},
"resource-pack-prompt": {"env": "RESOURCE_PACK_PROMPT"}, "resource-pack-prompt": {"env": "RESOURCE_PACK_PROMPT"},
"resource-pack-sha1": {"env": "RESOURCE_PACK_SHA1"}, "resource-pack-sha1": {"env": "RESOURCE_PACK_SHA1"},
"require-resource-pack": {"env": "RESOURCE_PACK_ENFORCE"}, "resource-pack": {"env": "RESOURCE_PACK"},
"server-ip": {"env": "SERVER_IP"}, "server-ip": {"env": "SERVER_IP"},
"server-name": {"env": "SERVER_NAME"}, "server-name": {"env": "SERVER_NAME"},
"server-port": {"env": "SERVER_PORT"}, "server-port": {"env": "SERVER_PORT"},

View File

@@ -139,6 +139,15 @@ cd /data || exit 1
export DECLARED_TYPE=${TYPE^^} export DECLARED_TYPE=${TYPE^^}
export DECLARED_VERSION="$VERSION" export DECLARED_VERSION="$VERSION"
if isTrue "${VERSION_FROM_MODRINTH_PROJECTS:-}" && [[ ${MODRINTH_PROJECTS:-} ]]; then
if ! VERSION=$(mc-image-helper version-from-modrinth-projects --projects "${MODRINTH_PROJECTS}"); then
logError "failed to resolve version from MODRINTH_PROJECTS: ${MODRINTH_PROJECTS}"
exit 1
fi
log "Resolved Minecraft version $VERSION from Modrinth projects"
export VERSION
fi
if isTrue "${ENABLE_AUTOPAUSE}"; then if isTrue "${ENABLE_AUTOPAUSE}"; then
"${SCRIPTS:-/}start-autopause" "${SCRIPTS:-/}start-autopause"
fi fi

View File

@@ -9,15 +9,24 @@ export TYPE=FABRIC
: "${FABRIC_LAUNCHER:=}" : "${FABRIC_LAUNCHER:=}"
: "${FABRIC_LAUNCHER_URL:=}" : "${FABRIC_LAUNCHER_URL:=}"
: "${FABRIC_LOADER_VERSION:=LATEST}" : "${FABRIC_LOADER_VERSION:=LATEST}"
: "${FABRIC_FORCE_REINSTALL:=false}"
resultsFile=/data/.install-fabric.env resultsFile=/data/.install-fabric.env
isDebugging && set -x isDebugging && set -x
commonArgs=(
--results-file="${resultsFile}"
)
if isTrue "${FABRIC_FORCE_REINSTALL}"; then
log "Forcing re-install of Fabric"
commonArgs+=(--force-reinstall)
fi
# Custom fabric jar # Custom fabric jar
if [[ $FABRIC_LAUNCHER ]]; then if [[ $FABRIC_LAUNCHER ]]; then
if ! mc-image-helper install-fabric-loader \ if ! mc-image-helper install-fabric-loader \
--results-file=${resultsFile} \ "${commonArgs[@]}" \
--from-local-file="$FABRIC_LAUNCHER"; then --from-local-file="$FABRIC_LAUNCHER"; then
logError "Failed to use provided Fabric launcher" logError "Failed to use provided Fabric launcher"
exit 1 exit 1
@@ -26,7 +35,7 @@ if [[ $FABRIC_LAUNCHER ]]; then
# Custom fabric jar url # Custom fabric jar url
elif [[ $FABRIC_LAUNCHER_URL ]]; then elif [[ $FABRIC_LAUNCHER_URL ]]; then
if ! mc-image-helper install-fabric-loader \ if ! mc-image-helper install-fabric-loader \
--results-file=${resultsFile} \ "${commonArgs[@]}" \
--from-url="$FABRIC_LAUNCHER_URL"; then --from-url="$FABRIC_LAUNCHER_URL"; then
logError "Failed to installFabric launcher from $FABRIC_LAUNCHER_URL" logError "Failed to installFabric launcher from $FABRIC_LAUNCHER_URL"
exit 1 exit 1
@@ -35,7 +44,7 @@ elif [[ $FABRIC_LAUNCHER_URL ]]; then
# Official fabric launcher # Official fabric launcher
else else
if ! mc-image-helper install-fabric-loader \ if ! mc-image-helper install-fabric-loader \
--results-file=${resultsFile} \ "${commonArgs[@]}" \
--minecraft-version="${VERSION}" \ --minecraft-version="${VERSION}" \
--installer-version="${FABRIC_LAUNCHER_VERSION}" \ --installer-version="${FABRIC_LAUNCHER_VERSION}" \
--loader-version="${FABRIC_LOADER_VERSION}"; then --loader-version="${FABRIC_LOADER_VERSION}"; then

View File

@@ -7,7 +7,7 @@ isDebugging && set -x
if ! SERVER=$(mc-image-helper github download-latest-asset \ if ! SERVER=$(mc-image-helper github download-latest-asset \
--output-directory=/data \ --output-directory=/data \
--name-pattern="NanoLimbo-.+?(?<!-sources)\.jar" \ --name-pattern="NanoLimbo-.+?(?<!-sources)\.jar" \
Nan1t/NanoLimbo BoomEaro/NanoLimbo
); then ); then
logError "Failed to download NanoLimbo" logError "Failed to download NanoLimbo"
exit 1 exit 1

View File

@@ -10,7 +10,7 @@ handleDebugMode
: "${PAPER_CHANNEL:=default}" : "${PAPER_CHANNEL:=default}"
: "${PAPER_DOWNLOAD_URL:=}" : "${PAPER_DOWNLOAD_URL:=}"
: "${PAPER_CUSTOM_JAR:=}" : "${PAPER_CUSTOM_JAR:=}"
: "${PAPER_CONFIG_DEFAULTS_REPO:=${PAPER_CONFIG_REPO:=https://raw.githubusercontent.com/dayyeeet/minecraft-default-configs/main}}" : "${PAPER_CONFIG_DEFAULTS_REPO:=${PAPER_CONFIG_REPO:=https://raw.githubusercontent.com/Shonz1/minecraft-default-configs/main}}"
resultsFile=/data/.paper.env resultsFile=/data/.paper.env
if [[ $PAPER_CUSTOM_JAR ]]; then if [[ $PAPER_CUSTOM_JAR ]]; then

View File

@@ -21,7 +21,9 @@ PUFFERFISH_BUILD_JSON=$(curl -X GET -s "https://ci.pufferfish.host/job/Pufferfis
PUFFERFISH_BUILD_URL=$(jq -n "$PUFFERFISH_BUILD_JSON" | jq -jc '.url // empty' ) PUFFERFISH_BUILD_URL=$(jq -n "$PUFFERFISH_BUILD_JSON" | jq -jc '.url // empty' )
# Example: "fileName": "pufferfish-paperclip-1.18.2-R0.1-SNAPSHOT-reobf.jar", # Example: "fileName": "pufferfish-paperclip-1.18.2-R0.1-SNAPSHOT-reobf.jar",
PUFFERFISH_BUILD_FILENAME=$(jq -n "$PUFFERFISH_BUILD_JSON" | jq -jc '.artifacts[].fileName // empty' ) PUFFERFISH_BUILD_FILENAME=$(jq -n "$PUFFERFISH_BUILD_JSON" | jq -jc '.artifacts[].fileName // empty' )
PUFFERFISH_BUILD_DOWNLOAD_URL="${PUFFERFISH_BUILD_URL}artifact/build/libs/${PUFFERFISH_BUILD_FILENAME}" # Example: "relativePath": "pufferfish-server/build/libs/pufferfish-paperclip-1.21.7-R0.1-SNAPSHOT-mojmap.jar",
PUFFERFISH_BUILD_PATH=$(jq -n "$PUFFERFISH_BUILD_JSON" | jq -jc '.artifacts[].relativePath // empty' )
PUFFERFISH_BUILD_DOWNLOAD_URL="${PUFFERFISH_BUILD_URL}artifact/${PUFFERFISH_BUILD_PATH}"
# Setting server to the Jar filename for export. # Setting server to the Jar filename for export.
export SERVER=$PUFFERFISH_BUILD_FILENAME export SERVER=$PUFFERFISH_BUILD_FILENAME

View File

@@ -14,7 +14,9 @@ handleDebugMode
: "${REPLACE_ENV_VARIABLES_EXCLUDE_PATHS:=}" : "${REPLACE_ENV_VARIABLES_EXCLUDE_PATHS:=}"
: "${PATCH_DEFINITIONS:=}" : "${PATCH_DEFINITIONS:=}"
: "${DEBUG:=false}" : "${DEBUG:=false}"
: "${DOWNLOAD_DEFAULTS:=}"
: "${DOWNLOAD_DEFAULT_CONFIGS:=}" : "${DOWNLOAD_DEFAULT_CONFIGS:=}"
: "${SKIP_DOWNLOAD_DEFAULTS:=false}"
if isTrue "${REPLACE_ENV_IN_PLACE}"; then if isTrue "${REPLACE_ENV_IN_PLACE}"; then
log "Replacing env variables in ${REPLACE_ENV_PATHS} that match the prefix '$REPLACE_ENV_VARIABLE_PREFIX' ..." log "Replacing env variables in ${REPLACE_ENV_PATHS} that match the prefix '$REPLACE_ENV_VARIABLE_PREFIX' ..."
@@ -27,22 +29,28 @@ if isTrue "${REPLACE_ENV_IN_PLACE}"; then
"${REPLACE_ENV_PATHS[@]}" "${REPLACE_ENV_PATHS[@]}"
fi fi
if [[ $DOWNLOAD_DEFAULT_CONFIGS ]]; then if isFalse "$SKIP_DOWNLOAD_DEFAULTS"; then
log "Downloading default configs, if needed" commonArgs=(
if ! mc-image-helper mcopy \ --skip-existing
--to /data/config \ --skip-up-to-date=false
--skip-existing --skip-up-to-date=false \ --quiet-when-skipped
"$DOWNLOAD_DEFAULT_CONFIGS" 2> /dev/null; then --ignore-missing-sources
logWarning "One or more default config files were not available from $DOWNLOAD_DEFAULT_CONFIGS" )
if [[ $DOWNLOAD_DEFAULT_CONFIGS ]]; then
if ! mc-image-helper mcopy \
--to /data/config \
"${commonArgs[@]}" \
"$DOWNLOAD_DEFAULT_CONFIGS"; then
logWarning "One or more default config files were not available from $DOWNLOAD_DEFAULT_CONFIGS"
fi
fi fi
fi if [[ $DOWNLOAD_DEFAULTS ]]; then
if [[ $DOWNLOAD_DEFAULTS ]]; then if ! mc-image-helper mcopy \
log "Downloading default top-level configs, if needed" --to /data \
if ! mc-image-helper mcopy \ "${commonArgs[@]}" \
--to /data \ "$DOWNLOAD_DEFAULTS"; then
--skip-existing --skip-up-to-date=false \ logWarning "One or more default files were not available from $DOWNLOAD_DEFAULTS"
"$DOWNLOAD_DEFAULTS" 2> /dev/null; then fi
logWarning "One or more default files were not available from $DOWNLOAD_DEFAULTS"
fi fi
fi fi

View File

@@ -12,6 +12,7 @@ set -e -o pipefail
: "${REMOVE_OLD_MODS_DEPTH:=1} " : "${REMOVE_OLD_MODS_DEPTH:=1} "
: "${REMOVE_OLD_MODS_INCLUDE:=*.jar,*-version.json}" : "${REMOVE_OLD_MODS_INCLUDE:=*.jar,*-version.json}"
: "${CF_API_KEY_FILE:=}" # Path to file containing CurseForge API key : "${CF_API_KEY_FILE:=}" # Path to file containing CurseForge API key
: "${MODRINTH_LOADER:=}"
sum_file=/data/.generic_pack.sum sum_file=/data/.generic_pack.sum
if [[ -n ${CF_API_KEY_FILE} ]]; then if [[ -n ${CF_API_KEY_FILE} ]]; then
@@ -263,13 +264,21 @@ function handleModrinthProjects() {
fi fi
if [[ $MODRINTH_PROJECTS ]]; then if [[ $MODRINTH_PROJECTS ]]; then
if isFamily HYBRID; then
if isType CUSTOM; then
if ! [[ $MODRINTH_LOADER ]]; then
logError "MODRINTH_LOADER must be set when using TYPE=CUSTOM and MODRINTH_PROJECTS"
exit 1
fi
loader="${MODRINTH_LOADER,,}"
elif isFamily HYBRID; then
loader=${HYBRIDTYPE} loader=${HYBRIDTYPE}
elif isFamily VANILLA; then elif isFamily VANILLA; then
loader=datapack loader=datapack
else else
loader="${TYPE,,}" loader="${TYPE,,}"
fi fi
mc-image-helper modrinth \ mc-image-helper modrinth \
--output-directory=/data \ --output-directory=/data \
--world-directory="${LEVEL:-world}" \ --world-directory="${LEVEL:-world}" \

View File

@@ -411,7 +411,7 @@ function isFamily() {
function isType() { function isType() {
for t in "${@}"; do for t in "${@}"; do
# shellcheck disable=SC2153 # shellcheck disable=SC2153
if [[ $TYPE == "$t" ]]; then if [[ ${TYPE^^} == "${t^^}" ]]; then
return 0 return 0
fi fi
done done

View File

@@ -0,0 +1,9 @@
services:
mc:
restart: "no"
image: ${IMAGE_TO_TEST:-itzg/minecraft-server}
environment:
EULA: "TRUE"
TYPE: NANOLIMBO
volumes:
- ./data:/data

View File

@@ -0,0 +1 @@
mc-image-helper assert fileExists "/data/NanoLimbo-*.jar"