fix: migrate PaperMC to v3 API, fix NeoForge beta fallback, add test suite

- Migrate Paper loader from sunset v2 API to v3 (fill.papermc.io)
- Fix NeoForge: fall back to beta versions when no stable exists (set -e + grep)
- Fix setEula/setperms ordering (was writing eula.txt before /data was writable)
- Fix setEula/serverInfoWrite to use absolute paths (/data/server/)
- Add VOLUME directive removal (was shadowing bind mounts)
- Add comprehensive API test suite (110 tests across 6 suites)
- Move test.sh to tests/integration.sh, switch to named volumes
- Add Docker build cache to CI workflows
- Add .editorconfig, expand .gitignore, improve README docs
This commit is contained in:
2026-08-21 12:49:27 -04:00
parent a6f610de28
commit 5688b30892
26 changed files with 2530 additions and 263 deletions
+9 -2
View File
@@ -3,6 +3,10 @@ FROM debian:bookworm-slim
ARG UID=1000
ARG GID=1000
LABEL org.opencontainers.image.title="Dockercraft" \
org.opencontainers.image.description="Docker image for running Minecraft servers with support for multiple loaders" \
org.opencontainers.image.source="https://github.com/jeremymcclure/dockercraft"
ENV DEBIAN_FRONTEND=noninteractive
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
@@ -17,7 +21,7 @@ RUN apt-get update && \
tini \
unzip \
netcat-openbsd && \
apt-get autoremove && apt-get clean && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN groupadd -g ${GID} minecraft && \
@@ -26,15 +30,18 @@ RUN groupadd -g ${GID} minecraft && \
mkdir -p /data && \
chown -R ${UID}:${GID} /data
# Install Jabba (Java version manager) as minecraft user
RUN su -c "curl -sL https://github.com/Jabba-Team/jabba/raw/main/install.sh | bash && . ~/.jabba/jabba.sh" minecraft
COPY ./scripts/ /scripts/
RUN chmod +x /scripts/init
EXPOSE 25565/tcp 19132/udp 19133/udp
STOPSIGNAL SIGTERM
USER minecraft
HEALTHCHECK --start-period=2m --interval=30s --timeout=10s --retries=3 \
CMD bash -c 'if [ "${MC_LOADER}" = "bedrock" ]; then nc -zu 127.0.0.1 19132; else nc -z 127.0.0.1 25565; fi'
ENTRYPOINT ["tini", "--", "/scripts/init"]