From a79619b74d81e9c1813feca48782c4c5cfabe2d3 Mon Sep 17 00:00:00 2001 From: ACoolName Date: Sat, 23 Dec 2023 18:09:16 +0200 Subject: [PATCH] added minecraft paper image --- minecraft/paper/Dockerfile | 20 ++++++++++++++++++++ minecraft/paper/eula.txt | 3 +++ 2 files changed, 23 insertions(+) create mode 100644 minecraft/paper/Dockerfile create mode 100644 minecraft/paper/eula.txt diff --git a/minecraft/paper/Dockerfile b/minecraft/paper/Dockerfile new file mode 100644 index 0000000..b3a3616 --- /dev/null +++ b/minecraft/paper/Dockerfile @@ -0,0 +1,20 @@ +FROM alpine:latest +ARG VERSION +RUN mkdir -p /opt/server +WORKDIR /opt/server +RUN apk add openjdk21 jq curl +RUN if [[ -z $VERSION ]] ; then VERSION=$(curl https://api.papermc.io/v2/projects/paper | jq -r .versions[-1]); fi;\ + curl -o server.jar $(\ + curl https://api.papermc.io/v2/projects/paper/versions/${VERSION}/builds |\ + jq -r --arg VERSION $VERSION '"https://api.papermc.io/v2/projects/paper/versions/" \ + + $VERSION \ + + "/builds/" \ + + (.builds[-1].build|tostring) \ + + "/downloads/" \ + + (.builds[-1].downloads.application.name)'\ + ) +COPY eula.txt eula.txt +RUN adduser minecraft -h /opt/server +USER minecraft:minecraft +RUN chmod 111 server.jar +ENTRYPOINT [ "java", "-jar", "server.jar" ] \ No newline at end of file diff --git a/minecraft/paper/eula.txt b/minecraft/paper/eula.txt new file mode 100644 index 0000000..49c6499 --- /dev/null +++ b/minecraft/paper/eula.txt @@ -0,0 +1,3 @@ +#By changing the setting below to TRUE you are indicating your agreement to our EULA (https://aka.ms/MinecraftEULA). +#Sat Dec 23 15:32:13 GMT 2023 +eula=true \ No newline at end of file