added minecraft paper image

This commit is contained in:
ACoolName 2023-12-23 18:09:16 +02:00
parent 533e9c4f07
commit a79619b74d
2 changed files with 23 additions and 0 deletions

View File

@ -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" ]

3
minecraft/paper/eula.txt Normal file
View File

@ -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