|
|
|
FROM openjdk:21-jdk-slim |
|
|
|
|
|
RUN apt-get update && apt-get install -y curl |
|
|
|
|
|
RUN mkdir -p /minecraft/cache && chmod -R 777 /minecraft/cache |
|
|
|
|
|
RUN mkdir -p /minecraft/versions/1.21 && chmod -R 777 /minecraft/versions |
|
|
|
|
|
RUN curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && \ |
|
dpkg -i cloudflared.deb |
|
|
|
|
|
WORKDIR /minecraft |
|
|
|
|
|
COPY paper.jar /minecraft/paper.jar |
|
COPY 1.21.jar /minecraft/1.21.jar |
|
RUN chmod 777 /minecraft/paper.jar /minecraft/1.21.jar |
|
|
|
|
|
COPY server.properties /minecraft/server.properties |
|
COPY eula.txt /minecraft/eula.txt |
|
|
|
|
|
RUN curl ifconfig.me |
|
|
|
|
|
EXPOSE 25565 |
|
|
|
|
|
RUN chmod -R 777 /minecraft |
|
|
|
|
|
COPY config.yml /etc/cloudflared/config.yml |
|
|
|
|
|
CMD ["sh", "-c", "cloudflared tunnel --config /etc/cloudflared/config.yml run && java -Xms4G -Xmx8G -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=16M -jar 1.21.jar nogui"] |
|
|