fix: add libbpf-dev for xdp clang headers, update papermc download API to fill.papermc.io/v3
This commit is contained in:
parent
c828915560
commit
997da7fbd3
3 changed files with 26 additions and 15 deletions
|
|
@ -1,16 +1,20 @@
|
|||
FROM eclipse-temurin:21-jre-noble
|
||||
|
||||
ARG PAPER_VERSION=1.21.4
|
||||
ARG PAPER_VERSION=1.21
|
||||
ARG PAPER_BUILD=latest
|
||||
|
||||
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
||||
RUN apt-get update && apt-get install -y curl jq && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Download Paper
|
||||
RUN curl -fsSLo /opt/paper.jar \
|
||||
"https://api.papermc.io/v2/projects/paper/versions/${PAPER_VERSION}/builds/${PAPER_BUILD}/downloads/paper-${PAPER_VERSION}-${PAPER_BUILD}.jar" || \
|
||||
echo "Falling back to direct download..." && \
|
||||
curl -fsSLo /opt/paper.jar \
|
||||
"https://papermc.io/api/v2/projects/paper/versions/${PAPER_VERSION}/builds/${PAPER_BUILD}/downloads/paper-${PAPER_VERSION}-${PAPER_BUILD}.jar"
|
||||
RUN VERSION="${PAPER_VERSION}" && \
|
||||
BUILD="${PAPER_BUILD}" && \
|
||||
BUILDS_JSON=$(curl -s -H "User-Agent: rampart/1.0.0 (https://github.com/loki5512344/rampart)" \
|
||||
"https://fill.papermc.io/v3/projects/paper/versions/${VERSION}/builds") && \
|
||||
if [ "${BUILD}" = "latest" ]; then \
|
||||
BUILD=$(echo "${BUILDS_JSON}" | jq -r 'first(.[] | select(.channel == "STABLE") | .id) // empty'); \
|
||||
fi && \
|
||||
URL=$(echo "${BUILDS_JSON}" | jq -r --arg b "${BUILD}" 'first(.[] | select(.id == ($b | tonumber)) | .downloads."server:default".url) // empty') && \
|
||||
curl -fsSLo /opt/paper.jar "${URL}"
|
||||
|
||||
COPY deploy/config/server.properties /opt/server.properties
|
||||
COPY deploy/config/paper-global.yml /opt/paper-global.yml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue