minecraft/Dockerfile

38 lines
987 B
Docker
Raw Normal View History

2021-02-18 14:31:55 +00:00
FROM openjdk:11 as builder
2016-07-20 14:56:47 +00:00
2021-02-18 14:31:55 +00:00
RUN git config --global user.email "papermcbuilder@vanwa.ch"
RUN git config --global user.name "Vanwa papermc builder"
2021-02-18 12:32:55 +00:00
2021-02-18 14:31:55 +00:00
RUN apt update && apt install -y \
patch \
maven
2021-02-18 12:32:55 +00:00
ENV VERSION=f521a18a17f32997793b2d0b2ebcd7890f200fc8
2021-02-18 14:31:55 +00:00
RUN git clone https://github.com/PaperMC/Paper.git
2019-12-20 11:20:32 +00:00
2021-02-18 14:31:55 +00:00
WORKDIR /Paper
RUN git checkout "$VERSION"
RUN ./paper jar
RUN mv /Paper/Paper-Server/target/paper-*.jar /Paper/Paper-Server/target/paper.jar
2017-10-18 08:26:41 +00:00
2018-11-27 07:36:16 +00:00
FROM thallian/confd-env:latest
2017-10-18 08:26:41 +00:00
2021-02-18 14:31:55 +00:00
COPY --from=builder /Paper/Paper-Server/target/paper.jar /var/lib/minecraft/paper.jar
2017-10-18 08:26:41 +00:00
2020-08-03 13:35:13 +00:00
RUN apk add --no-cache \
2021-02-18 14:31:55 +00:00
openjdk11-jre-headless \
2020-08-03 13:35:13 +00:00
openssl
2016-07-20 14:56:47 +00:00
2017-10-18 09:27:59 +00:00
RUN addgroup minecraft -g 2222
RUN adduser -u 2222 -h /var/lib/minecraft -D -G minecraft minecraft
2016-07-20 14:56:47 +00:00
2017-07-12 08:26:40 +00:00
RUN mkdir -p /etc/services.d/minecraft/
2016-07-20 14:56:47 +00:00
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
2017-10-18 08:26:41 +00:00
EXPOSE 25565