From 701151fbfe2f1d84520aa6134b217f04eaa9376d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sivert=20V=2E=20S=C3=A6ther?= Date: Mon, 24 Nov 2025 15:02:52 +0100 Subject: [PATCH] =?UTF-8?q?Waterfall=20=E2=9D=8C=20Velocity=20=E2=9C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- siverten/velocity/Dockerfile | 35 +++++++++++++++++++++++++++++++++++ siverten/waterfall/Dockerfile | 35 ----------------------------------- 3 files changed, 36 insertions(+), 36 deletions(-) create mode 100644 siverten/velocity/Dockerfile delete mode 100644 siverten/waterfall/Dockerfile diff --git a/Makefile b/Makefile index 87ce47f..09cfeb5 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: build push hub build_reg push_reg registry all modded_mc = magma rlcraft -mc_contexts = $(modded_mc) papermc waterfall +mc_contexts = $(modded_mc) papermc velocity game_contexts = $(mc_contexts) tshock contexts = ansible bind9 oxen tor $(game_contexts) diff --git a/siverten/velocity/Dockerfile b/siverten/velocity/Dockerfile new file mode 100644 index 0000000..198b2ce --- /dev/null +++ b/siverten/velocity/Dockerfile @@ -0,0 +1,35 @@ +ARG VELOCITY_VERSION=latest +ARG JAVA_VERSION=21 + +FROM alpine AS tools +RUN apk add --update-cache --no-cache \ + curl \ + jq + +FROM tools AS waterfall +RUN if test -z "${VELOCITY_VERSION}" || test "${VELOCITY_VERSION}" == "latest"; then \ + echo "### Fetching latest version"; \ + WATERFALL_VERSION=$(\ + curl -sl https://fill.papermc.io/v3/projects/velocity | \ + jq -r '.versions["3.0.0"][0]' \ + ); \ + fi && \ + echo "### Using version <${VELOCITY_VERSION}>" && \ + DOWNLOAD_URL=$(\ + curl -sl "https://fill.papermc.io/v3/projects/velocity/versions/${WATERFALL_VERSION}/builds" | \ + jq -r 'first(.[] | select(.channel == "STABLE") | .downloads."server:default".url) // "null"' \ + ) && \ + echo "### Downloading <${DOWNLOAD_URL}>" && \ + curl -lfso velocity.jar "${DOWNLOAD_URL}" + +FROM eclipse-temurin:${JAVA_VERSION} +RUN useradd --create-home --shell /bin/bash minecraft \ + && mkdir -p /opt/velocity /velocity \ + && chown -R minecraft /velocity/ +COPY --from=waterfall /velocity.jar /opt/velocity/ +USER minecraft +WORKDIR /velocity +VOLUME /velocity +EXPOSE 25565 +ENV JAVA_MEM=1G +CMD java -Xms${JAVA_MEM} -Xmx${JAVA_MEM} -jar /opt/velocity/velocity.jar diff --git a/siverten/waterfall/Dockerfile b/siverten/waterfall/Dockerfile deleted file mode 100644 index 88412a4..0000000 --- a/siverten/waterfall/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -ARG WATERFALL_VERSION=latest -ARG JAVA_VERSION=11 - -FROM alpine AS tools -RUN apk add --update-cache --no-cache \ - curl \ - jq - -FROM tools AS waterfall -RUN if test -z "${WATERFALL_VERSION}" || test "${WATERFALL_VERSION}" == "latest" || test "${WATERFALL_VERSION}" == "master"; then \ - echo "### Fetching latest version"; \ - WATERFALL_VERSION=$(\ - curl --silent --location https://papermc.io/api/v1/waterfall/ | \ - jq --raw-output '.versions[0]' \ - ); \ - fi && \ - echo "### Using version <${WATERFALL_VERSION}>" && \ - WATERFALL_VERSION_PATCH=$(\ - curl --silent --location https://papermc.io/api/v1/waterfall/${WATERFALL_VERSION}/ | \ - jq --raw-output '.builds.latest' \ - ) && \ - echo "### Using patch <${WATERFALL_VERSION_PATCH}>" && \ - curl --silent --location --fail --output /waterfall.jar https://papermc.io/api/v1/waterfall/${WATERFALL_VERSION}/${WATERFALL_VERSION_PATCH}/download - -FROM openjdk:${JAVA_VERSION}-jre -RUN useradd --create-home --shell /bin/bash minecraft \ - && mkdir -p /opt/waterfall /waterfall \ - && chown -R minecraft /waterfall/ -COPY --from=waterfall /waterfall.jar /opt/waterfall/ -USER minecraft -WORKDIR /waterfall -VOLUME /waterfall -EXPOSE 25565 -ENV JAVA_MEM=1G -CMD java -Xms${JAVA_MEM} -Xmx${JAVA_MEM} -jar /opt/waterfall/waterfall.jar