Compare commits

..

No commits in common. "a6795c71c75f5e47df7fb1be057a45f5645b0c3d" and "ecb835fa525476d5ec8be233738e1e309071358b" have entirely different histories.

3 changed files with 15 additions and 23 deletions

View File

@ -2,22 +2,25 @@ FROM eclipse-temurin:17-jdk
ARG RUNNABLE_SERVER_JAR ARG RUNNABLE_SERVER_JAR
# create directories
WORKDIR /data WORKDIR /data
RUN mkdir bin bundle workdir RUN mkdir jar bundle workdir
# add executable files ADD $RUNNABLE_SERVER_JAR jar/paper.jar
ADD $RUNNABLE_SERVER_JAR bin/paper.jar
ADD run.sh bin/run.sh
# download paper libraries and apply patches RUN java -DbundlerRepoDir=/data/bundle -Dpaperclip.patchonly=true -jar /data/jar/paper.jar
RUN java -DbundlerRepoDir=/data/bundle -Dpaperclip.patchonly=true -jar /data/bin/paper.jar
# configure max heap size
ENV MAXMEM=1024M ENV MAXMEM=1024M
EXPOSE 25565 EXPOSE 25565
VOLUME /data/workdir VOLUME /data/workdir
WORKDIR /data/workdir WORKDIR /data/workdir
CMD ["sh", "/data/bin/run.sh"] CMD java -Xmx$MAXMEM -XX:+UseG1GC -XX:+ParallelRefProcEnabled \
-XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions \
-XX:G1ReservePercent=15 -XX:G1NewSizePercent=20 -XX:G1MaxNewSizePercent=30 \
-XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 \
-XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 \
-XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 \
-XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=5 \
-DbundlerRepoDir=/data/bundle \
-jar /data/jar/paper.jar nogui

View File

@ -50,11 +50,11 @@ curl -o $RUNNABLE_SERVER_JAR $DOWNLOAD_REOBF
DOCKER_TAG="pandacubefr/paper:"$MC_VERSION"-"$PAPER_BUILD DOCKER_TAG="pandacubefr/paper:"$MC_VERSION"-"$PAPER_BUILD
echo "Building docker image with pre-downloaded and pre-patched files, with tag "$DOCKER_TAG echo "Building docker image with pre-downloaded and pre-patched files, with tag "$DOCKER_TAG
docker build --build-arg RUNNABLE_SERVER_JAR=$RUNNABLE_SERVER_JAR -t $DOCKER_TAG -f Dockerfile.paper . docker build --build-arg RUNNABLE_SERVER_JAR=$RUNNABLE_SERVER_JAR -t $DOCKER_TAG .
DOCKER_IMAGE_FILE="Paper-docker-"$MC_VERSION"-"$PAPER_BUILD".tar.gz" DOCKER_IMAGE_FILE="Paper-docker-image-"$MC_VERSION"-"$PAPER_BUILD".tar.gz"
echo "Saving docker image to "$DOCKER_IMAGE_FILE echo "Saving docker image to "$DOCKER_IMAGE_FILE
docker save $DOCKER_TAG | gzip > $DOCKER_IMAGE_FILE docker save -o $DOCKER_IMAGE_FILE $DOCKER_TAG
#mkdir uberjar #mkdir uberjar
#for jar in `cat jars.txt`; do #for jar in `cat jars.txt`; do

11
run.sh
View File

@ -1,11 +0,0 @@
#!/bin/sh
java -Xmx$MAXMEM -XX:+UseG1GC -XX:+ParallelRefProcEnabled \
-XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions \
-XX:G1ReservePercent=15 -XX:G1NewSizePercent=20 -XX:G1MaxNewSizePercent=30 \
-XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 \
-XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 \
-XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 \
-XX:MaxHeapFreeRatio=30 -XX:MinHeapFreeRatio=5 \
-DbundlerRepoDir=/data/bundle \
-jar /data/bin/paper.jar nogui