minecraft/Containerfile
Sebastian Hugentobler 0b53335aea
All checks were successful
Build Multiarch Container Image / call-reusable-workflow (push) Successful in 1m36s
push to 1.20.6-147
2024-06-27 19:23:02 +02:00

33 lines
1.0 KiB
Docker

FROM docker.io/thallian/confd-env:3.20-3.1.6.2
RUN addgroup minecraft -g 2222
RUN adduser -u 2222 -h /var/lib/minecraft -D -G minecraft minecraft
ENV VERSION=1.20.6
ENV SERIAL=147
ENV SHA256_SUM=24c58de34153160f3b466c70c94afcec9b3d2b20a6681863e839df7b7bdb9594
RUN wget -O /var/lib/minecraft/paper.jar \
https://papermc.io/api/v2/projects/paper/versions/$VERSION/builds/$SERIAL/downloads/paper-$VERSION-$SERIAL.jar
RUN echo "$SHA256_SUM /var/lib/minecraft/paper.jar" | sha256sum -c - || exit 1
RUN apk add --no-cache \
openssl \
openjdk21-jre-headless
ADD /rootfs /
RUN mkdir /var/lib/minecraft/settings
WORKDIR /var/lib/minecraft
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
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