minecraft/Dockerfile

38 lines
987 B
Docker

FROM openjdk:11 as builder
RUN git config --global user.email "papermcbuilder@vanwa.ch"
RUN git config --global user.name "Vanwa papermc builder"
RUN apt update && apt install -y \
patch \
maven
ENV VERSION=f521a18a17f32997793b2d0b2ebcd7890f200fc8
RUN git clone https://github.com/PaperMC/Paper.git
WORKDIR /Paper
RUN git checkout "$VERSION"
RUN ./paper jar
RUN mv /Paper/Paper-Server/target/paper-*.jar /Paper/Paper-Server/target/paper.jar
FROM thallian/confd-env:latest
COPY --from=builder /Paper/Paper-Server/target/paper.jar /var/lib/minecraft/paper.jar
RUN apk add --no-cache \
openjdk11-jre-headless \
openssl
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