use new paper build system

This commit is contained in:
Sebastian Hugentobler 2021-08-05 20:21:32 +02:00
parent 1af4f18d95
commit bd20fad56d
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0

View File

@ -1,18 +1,20 @@
FROM openjdk:11 as builder 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.email "papermcbuilder@vanwa.ch"
RUN git config --global user.name "Vanwa papermc builder" RUN git config --global user.name "Vanwa papermc builder"
RUN apt update && apt install -y \
patch \
maven
ENV VERSION=f521a18a17f32997793b2d0b2ebcd7890f200fc8 ENV VERSION=f521a18a17f32997793b2d0b2ebcd7890f200fc8
RUN git clone https://github.com/PaperMC/Paper.git RUN git clone https://github.com/PaperMC/Paper.git
WORKDIR /Paper WORKDIR /Paper
RUN git checkout "$VERSION" RUN git checkout "$VERSION"
RUN ./paper jar RUN ./gradlew applyPatches
RUN ./gradlew reobfJar
RUN mv /Paper/Paper-Server/target/paper-*.jar /Paper/Paper-Server/target/paper.jar RUN mv /Paper/Paper-Server/target/paper-*.jar /Paper/Paper-Server/target/paper.jar
FROM thallian/confd-env:latest FROM thallian/confd-env:latest
@ -20,9 +22,11 @@ FROM thallian/confd-env:latest
COPY --from=builder /Paper/Paper-Server/target/paper.jar /var/lib/minecraft/paper.jar COPY --from=builder /Paper/Paper-Server/target/paper.jar /var/lib/minecraft/paper.jar
RUN apk add --no-cache \ RUN apk add --no-cache \
openjdk11-jre-headless \
openssl openssl
RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
openjdk16-jre-headless
RUN addgroup minecraft -g 2222 RUN addgroup minecraft -g 2222
RUN adduser -u 2222 -h /var/lib/minecraft -D -G minecraft minecraft RUN adduser -u 2222 -h /var/lib/minecraft -D -G minecraft minecraft