42 lines
1.1 KiB
Docker
42 lines
1.1 KiB
Docker
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 apk add --no-cache \
|
|
openssl
|
|
|
|
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 /
|
|
|
|
RUN chown -R minecraft:minecraft /var/lib/minecraft
|
|
|
|
VOLUME /var/lib/minecraft/world /var/lib/minecraft/world_nether /var/lib/minecraft/world_the_end /var/lib/minecraft/plugins
|
|
|
|
EXPOSE 25565
|