minecraft/Dockerfile

42 lines
1.1 KiB
Docker
Raw Normal View History

2021-08-05 18:21:32 +00:00
FROM openjdk:16-alpine as builder
RUN apk --no-cache add \
patch \
maven \
git
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
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"
2021-08-05 18:21:32 +00:00
RUN ./gradlew applyPatches
RUN ./gradlew reobfJar
2021-08-05 18:48:03 +00:00
RUN mv /Paper/Paper-Server/build/libs/Paper-Server-*-mapped.jar /Paper/Paper-Server/build/libs/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-08-05 18:48:03 +00:00
COPY --from=builder /Paper/Paper-Server/build/libs/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 \
openssl
2016-07-20 14:56:47 +00:00
2021-08-05 18:21:32 +00:00
RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
openjdk16-jre-headless
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