download the prebuilt jar...

This commit is contained in:
Sebastian Hugentobler 2021-08-05 21:21:37 +02:00
parent 7d235c12f9
commit 9fc6febbc2
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0

View File

@ -1,25 +1,15 @@
FROM openjdk:16-alpine as builder
RUN apk --no-cache add \
patch \
maven \
git
RUN git config --global user.email "papermcbuilder@vanwa.ch"
RUN git config --global user.name "Vanwa papermc builder"
ENV VERSION=f521a18a17f32997793b2d0b2ebcd7890f200fc8
RUN git clone https://github.com/PaperMC/Paper.git
WORKDIR /Paper
RUN git checkout "$VERSION"
RUN ./gradlew applyPatches
RUN ./gradlew build
RUN mv /Paper/Paper-Server/build/libs/Paper-Server-*-dev.jar /Paper/Paper-Server/build/libs/paper.jar
FROM thallian/confd-env:latest
COPY --from=builder /Paper/Paper-Server/build/libs/paper.jar /var/lib/minecraft/paper.jar
RUN addgroup minecraft -g 2222
RUN adduser -u 2222 -h /var/lib/minecraft -D -G minecraft minecraft
ENV VERSION=1.17.1
ENV SERIAL=157
ENV SHA256_SUM=862b043fbc0be948c380bced4aee224200568954db941ca6f6ac568cab263991
RUN wget -O /var/lib/minecraft/paper.jar \
https://papermc.io/api/v2/projects/paper/versions/$VERSION/builds/$SERIAL/downloads/paper-$VERSION-$SERIAL.jar
RUN echo "$SHA256_SUM /var/lib/minecraft/paper.jar" | sha256sum -c - || exit 1
RUN apk add --no-cache \
openssl
@ -27,9 +17,6 @@ RUN apk add --no-cache \
RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
openjdk16-jre-headless
RUN addgroup minecraft -g 2222
RUN adduser -u 2222 -h /var/lib/minecraft -D -G minecraft minecraft
RUN mkdir -p /etc/services.d/minecraft/
ADD /rootfs /