Add optional Modrinth projects support (? suffix) documentation#4004
Add optional Modrinth projects support (? suffix) documentation#4004itzg merged 2 commits intoitzg:masterfrom
? suffix) documentation#4004Conversation
|
To get the changes all together, go ahead and bump this to 1.56.0 docker-minecraft-server/Dockerfile Line 58 in 2320547 |
|
Done! Thank you very much for your help 😁 |
|
Thanks. Have you built an image locally and confirmed it all works as you're expecting? https://docker-minecraft-server.readthedocs.io/en/latest/misc/building/ |
|
Yes! Here are the Dockerfile and compose file I used: docker compose up --buildFROM itzg/minecraft-server:java25
ARG MC_HELPER_VERSION=1.56.0
RUN set -eux; \
curl -fsSL https://github.com/itzg/mc-image-helper/releases/download/${MC_HELPER_VERSION}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
| tar -C /usr/share -zxf -; \
rm -f /usr/share/mc-image-helper; \
ln -s /usr/share/mc-image-helper-${MC_HELPER_VERSION} /usr/share/mc-image-helper; \
ln -sf /usr/share/mc-image-helper/bin/mc-image-helper /usr/bin/mc-image-helperservices:
mc:
build: .
pull_policy: build
restart: unless-stopped
environment:
EULA: true
TYPE: "FABRIC"
MODRINTH_PROJECTS: |
fabric-api
pl3xmap?:beta
ports:
- "25565:25565/tcp"
volumes:
- ./data:/dataAnd the logs I got:
|
|
Testing sounds perfect. Your approach helped me realize a manual build-test could be done against the repo itself with: 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 |
|
That makes sense, thanks for the clarification! I wasn’t aware the repo could be built directly like that with build args, that’s good to know. My initial approach was just to validate the fix in isolation by extending the base image. Thank you very much for the quick reviews and merge! |
Closes #3997
Summary
Originally posted by @itzg in itzg/mc-image-helper#742 (comment)
Adds documentation for the optional Modrinth projects feature (
?suffix), whose implementation lives in itzg/mc-image-helper#742.Usage
The
?works with all existing format variations:slug?,prefix:slug?,slug?:version, etc.Combined with
VERSION_FROM_MODRINTH_PROJECTSOptional projects are excluded from version resolution, so they never block a Minecraft upgrade:
Changes
docs/mods-and-plugins/modrinth.mdBehavior
?) projects determine the Minecraft version