diff --git a/Dockerfile b/Dockerfile index 5cda0b9..9036f1b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 /