fix: request compressed JSON from PaperMC v3 API in Dockerfile.paper
This commit is contained in:
parent
b446fd4f7b
commit
2e4c50ab4a
1 changed files with 2 additions and 2 deletions
|
|
@ -8,13 +8,13 @@ RUN apt-get update && apt-get install -y curl jq && rm -rf /var/lib/apt/lists/*
|
||||||
# Download Paper
|
# Download Paper
|
||||||
RUN VERSION="${PAPER_VERSION}" && \
|
RUN VERSION="${PAPER_VERSION}" && \
|
||||||
BUILD="${PAPER_BUILD}" && \
|
BUILD="${PAPER_BUILD}" && \
|
||||||
BUILDS_JSON=$(curl -s -H "User-Agent: rampart/1.0.0 (https://github.com/loki5512344/rampart)" \
|
BUILDS_JSON=$(curl --compressed -s -H "User-Agent: rampart/1.0.0 (https://github.com/loki5512344/rampart)" \
|
||||||
"https://fill.papermc.io/v3/projects/paper/versions/${VERSION}/builds") && \
|
"https://fill.papermc.io/v3/projects/paper/versions/${VERSION}/builds") && \
|
||||||
if [ "${BUILD}" = "latest" ]; then \
|
if [ "${BUILD}" = "latest" ]; then \
|
||||||
BUILD=$(echo "${BUILDS_JSON}" | jq -r 'first(.[] | select(.channel == "STABLE") | .id) // empty'); \
|
BUILD=$(echo "${BUILDS_JSON}" | jq -r 'first(.[] | select(.channel == "STABLE") | .id) // empty'); \
|
||||||
fi && \
|
fi && \
|
||||||
URL=$(echo "${BUILDS_JSON}" | jq -r --arg b "${BUILD}" 'first(.[] | select(.id == ($b | tonumber)) | .downloads."server:default".url) // empty') && \
|
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}"
|
curl --compressed -fsSLo /opt/paper.jar "${URL}"
|
||||||
|
|
||||||
COPY deploy/config/server.properties /opt/server.properties
|
COPY deploy/config/server.properties /opt/server.properties
|
||||||
COPY deploy/config/paper-global.yml /opt/paper-global.yml
|
COPY deploy/config/paper-global.yml /opt/paper-global.yml
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue