mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-04-10 15:48:50 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb4fe3c7bf | ||
|
|
8c9e2c653f | ||
|
|
bd98fe57ba |
@@ -55,7 +55,7 @@ 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-image-helper versioning=loose
|
# renovate: datasource=github-releases packageName=itzg/mc-image-helper versioning=loose
|
||||||
ARG MC_HELPER_VERSION=1.55.4
|
ARG MC_HELPER_VERSION=1.56.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
|
||||||
|
|||||||
@@ -21,6 +21,30 @@ docker compose -f compose-dev.yml run --rm -it [-e key=value] mc-dev
|
|||||||
|
|
||||||
To speed up the development cycle, it is recommended to set `SETUP_ONLY` to `true` as part of the run command above.
|
To speed up the development cycle, it is recommended to set `SETUP_ONLY` to `true` as part of the run command above.
|
||||||
|
|
||||||
|
## Building the image with a new release of a tool
|
||||||
|
|
||||||
|
In this exapmle, let's say that [mc-image-helper](https://github.com/itzg/mc-image-helper) has been [released](https://github.com/itzg/mc-image-helper/releases) at 1.56.0, but the corresponding changes in the image [scripts](https://github.com/itzg/docker-minecraft-server/tree/23205471db9814cff9c6602361dbc6cdd6c4230a/scripts) need to be tested against that version while updating [the Dockerfile](https://github.com/itzg/docker-minecraft-server/blob/23205471db9814cff9c6602361dbc6cdd6c4230a/Dockerfile#L58).
|
||||||
|
|
||||||
|
```yaml title="tests/manual/optional-projects/compose.yml" hl_lines="7"
|
||||||
|
services:
|
||||||
|
mc:
|
||||||
|
build:
|
||||||
|
# ...or wherever you cloned the docker-minecraft-server repo
|
||||||
|
context: ../../..
|
||||||
|
args:
|
||||||
|
MC_HELPER_VERSION: 1.56.0
|
||||||
|
environment:
|
||||||
|
EULA: true
|
||||||
|
TYPE: "FABRIC"
|
||||||
|
MODRINTH_PROJECTS: |
|
||||||
|
fabric-api
|
||||||
|
pl3xmap?:beta
|
||||||
|
ports:
|
||||||
|
- "25565:25565/tcp"
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
|
```
|
||||||
|
|
||||||
## Using development copy of tools
|
## Using development copy of tools
|
||||||
|
|
||||||
In the cloned repo, such as [`mc-image-helper`](https://github.com/itzg/mc-image-helper), install the distribution locally by running:
|
In the cloned repo, such as [`mc-image-helper`](https://github.com/itzg/mc-image-helper), install the distribution locally by running:
|
||||||
|
|||||||
@@ -86,6 +86,54 @@ Where:
|
|||||||
|
|
||||||
To temporarily disable processing of the `MODRINTH_PROJECTS` list, then comment out the `MODRINTH_PROJECTS` environment variable.
|
To temporarily disable processing of the `MODRINTH_PROJECTS` list, then comment out the `MODRINTH_PROJECTS` environment variable.
|
||||||
|
|
||||||
|
## Optional projects
|
||||||
|
|
||||||
|
Projects that are not critical for the server to function can be marked as **optional** by appending a `?` to the project slug or ID. When a compatible version cannot be found for an optional project, the server logs a warning and continues startup instead of failing.
|
||||||
|
|
||||||
|
This is particularly useful for server-side mods that tend to lag behind on Minecraft updates, such as map renderers (Pl3xmap, BlueMap), performance mods (Lithium, C2ME), or admin tools (Spark, LuckPerms).
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
MODRINTH_PROJECTS: |
|
||||||
|
fabric-api
|
||||||
|
lithium
|
||||||
|
pl3xmap?
|
||||||
|
bluemap?:beta
|
||||||
|
```
|
||||||
|
|
||||||
|
The `?` marker can be combined with all existing format options:
|
||||||
|
|
||||||
|
| Format | Example |
|
||||||
|
|----------------------------|---------------------------|
|
||||||
|
| Slug only | `pl3xmap?` |
|
||||||
|
| With version | `pl3xmap?:Oa9ZDzZq` |
|
||||||
|
| With release type | `pl3xmap?:beta` |
|
||||||
|
| With loader prefix | `fabric:pl3xmap?` |
|
||||||
|
| Full combination | `fabric:pl3xmap?:beta` |
|
||||||
|
| In listing files | `pl3xmap?` *(one per line)* |
|
||||||
|
|
||||||
|
When combined with [`VERSION_FROM_MODRINTH_PROJECTS`](#version-from-projects), optional projects are **excluded** from the version calculation. This means an optional mod that hasn't been updated yet will never block a Minecraft version upgrade.
|
||||||
|
|
||||||
|
!!! example "Automatic upgrades without optional-mod breakage"
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
MODRINTH_PROJECTS: |
|
||||||
|
fabric-api
|
||||||
|
lithium
|
||||||
|
pl3xmap?
|
||||||
|
VERSION_FROM_MODRINTH_PROJECTS: true
|
||||||
|
```
|
||||||
|
|
||||||
|
If a new Minecraft version is released and `fabric-api` + `lithium` support it but `pl3xmap` does not:
|
||||||
|
|
||||||
|
1. The resolved `VERSION` is set to the new version (pl3xmap is not considered)
|
||||||
|
2. `fabric-api` and `lithium` are installed normally
|
||||||
|
3. `pl3xmap` is skipped with a warning in the logs
|
||||||
|
4. On a future restart, once pl3xmap publishes a compatible build, it is picked up automatically
|
||||||
|
|
||||||
|
!!! note
|
||||||
|
|
||||||
|
Optional projects marked with `?` in listing files (`@/path/to/file.txt`) are supported ; the `?` is parsed from each line the same way as inline entries.
|
||||||
|
|
||||||
## Version from Projects
|
## 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`.
|
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`.
|
||||||
@@ -115,4 +163,3 @@ When the environment variable `VERSION_FROM_MODRINTH_PROJECTS` is set to "true"
|
|||||||
|
|
||||||
`MODRINTH_LOADER`
|
`MODRINTH_LOADER`
|
||||||
: When using a custom server, set this to specify which loader type will be requested during lookups
|
: When using a custom server, set this to specify which loader type will be requested during lookups
|
||||||
|
|
||||||
|
|||||||
17
tests/manual/optional-projects/compose.yml
Normal file
17
tests/manual/optional-projects/compose.yml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
services:
|
||||||
|
mc:
|
||||||
|
build:
|
||||||
|
# ...or wherever you cloned the docker-minecraft-server repo
|
||||||
|
context: ../../..
|
||||||
|
args:
|
||||||
|
MC_HELPER_VERSION: 1.56.0
|
||||||
|
environment:
|
||||||
|
EULA: true
|
||||||
|
TYPE: "FABRIC"
|
||||||
|
MODRINTH_PROJECTS: |
|
||||||
|
fabric-api
|
||||||
|
pl3xmap?:beta
|
||||||
|
ports:
|
||||||
|
- "25565:25565/tcp"
|
||||||
|
volumes:
|
||||||
|
- ./data:/data
|
||||||
Reference in New Issue
Block a user