PaperDockerBuilder/Dockerfile

24 lines
473 B
Docker
Raw Permalink Normal View History

2024-05-31 23:52:02 +02:00
FROM eclipse-temurin:21-jdk
2022-12-02 16:07:32 +01:00
ARG RUNNABLE_SERVER_JAR
2022-12-08 15:18:19 +01:00
# create directories
2022-12-02 16:07:32 +01:00
WORKDIR /data
2022-12-08 15:18:19 +01:00
RUN mkdir bin bundle workdir
2022-12-02 16:07:32 +01:00
2022-12-08 15:18:19 +01:00
# add executable files
ADD $RUNNABLE_SERVER_JAR bin/paper.jar
ADD run.sh bin/run.sh
2022-12-02 16:07:32 +01:00
2022-12-08 15:18:19 +01:00
# download paper libraries and apply patches
RUN java -DbundlerRepoDir=/data/bundle -Dpaperclip.patchonly=true -jar /data/bin/paper.jar
2022-12-02 16:07:32 +01:00
2022-12-08 15:18:19 +01:00
# configure max heap size
2022-12-02 16:07:32 +01:00
ENV MAXMEM=1024M
EXPOSE 25565
VOLUME /data/workdir
2022-12-02 16:32:28 +01:00
WORKDIR /data/workdir
2022-12-08 15:18:19 +01:00
CMD ["sh", "/data/bin/run.sh"]