added minecraft paper image
This commit is contained in:
parent
533e9c4f07
commit
a79619b74d
20
minecraft/paper/Dockerfile
Normal file
20
minecraft/paper/Dockerfile
Normal 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
3
minecraft/paper/eula.txt
Normal 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
|
Loading…
x
Reference in New Issue
Block a user