minecraft/Containerfile

33 lines
1.0 KiB
Plaintext
Raw Normal View History

2024-05-27 14:10:26 +00:00
FROM docker.io/thallian/confd-env:3.20-3.1.6.2
2019-12-20 11:20:32 +00:00
2021-08-05 19:21:37 +00:00
RUN addgroup minecraft -g 2222
RUN adduser -u 2222 -h /var/lib/minecraft -D -G minecraft minecraft
2017-10-18 08:26:41 +00:00
2024-06-02 06:19:04 +00:00
ENV VERSION=1.20.6
2024-06-27 17:23:02 +00:00
ENV SERIAL=147
ENV SHA256_SUM=24c58de34153160f3b466c70c94afcec9b3d2b20a6681863e839df7b7bdb9594
2021-08-05 19:21:37 +00:00
RUN wget -O /var/lib/minecraft/paper.jar \
2023-12-19 16:19:42 +00:00
https://papermc.io/api/v2/projects/paper/versions/$VERSION/builds/$SERIAL/downloads/paper-$VERSION-$SERIAL.jar
2017-10-18 08:26:41 +00:00
2021-08-05 19:21:37 +00:00
RUN echo "$SHA256_SUM /var/lib/minecraft/paper.jar" | sha256sum -c - || exit 1
2017-10-18 08:26:41 +00:00
2020-08-03 13:35:13 +00:00
RUN apk add --no-cache \
2022-11-14 08:59:23 +00:00
openssl \
2023-12-19 16:19:42 +00:00
openjdk21-jre-headless
2016-07-20 14:56:47 +00:00
2022-02-15 19:57:21 +00:00
ADD /rootfs /
2021-08-05 18:21:32 +00:00
2022-02-15 19:57:21 +00:00
RUN mkdir /var/lib/minecraft/settings
WORKDIR /var/lib/minecraft
2016-07-20 14:56:47 +00:00
2022-02-16 07:43:43 +00:00
RUN ln -s settings/ops.json ops.json
RUN ln -s settings/whitelist.json whitelist.json
RUN ln -s settings/banned-ips.json banned-ips.json
RUN ln -s settings/banned-players.json banned-players.json
2016-07-20 14:56:47 +00:00
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