Compare commits
2 Commits
ecb835fa52
...
a6795c71c7
Author | SHA1 | Date | |
---|---|---|---|
a6795c71c7 | |||
eeb5f95f91 |
21
Dockerfile
21
Dockerfile
@ -2,25 +2,22 @@ FROM eclipse-temurin:17-jdk
|
|||||||
|
|
||||||
ARG RUNNABLE_SERVER_JAR
|
ARG RUNNABLE_SERVER_JAR
|
||||||
|
|
||||||
|
# create directories
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
RUN mkdir jar bundle workdir
|
RUN mkdir bin bundle workdir
|
||||||
|
|
||||||
ADD $RUNNABLE_SERVER_JAR jar/paper.jar
|
# add executable files
|
||||||
|
ADD $RUNNABLE_SERVER_JAR bin/paper.jar
|
||||||
|
ADD run.sh bin/run.sh
|
||||||
|
|
||||||
RUN java -DbundlerRepoDir=/data/bundle -Dpaperclip.patchonly=true -jar /data/jar/paper.jar
|
# download paper libraries and apply patches
|
||||||
|
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 java -Xmx$MAXMEM -XX:+UseG1GC -XX:+ParallelRefProcEnabled \
|
CMD ["sh", "/data/bin/run.sh"]
|
||||||
-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
|
|
||||||
|
6
build.sh
6
build.sh
@ -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 .
|
docker build --build-arg RUNNABLE_SERVER_JAR=$RUNNABLE_SERVER_JAR -t $DOCKER_TAG -f Dockerfile.paper .
|
||||||
|
|
||||||
DOCKER_IMAGE_FILE="Paper-docker-image-"$MC_VERSION"-"$PAPER_BUILD".tar.gz"
|
DOCKER_IMAGE_FILE="Paper-docker-"$MC_VERSION"-"$PAPER_BUILD".tar.gz"
|
||||||
echo "Saving docker image to "$DOCKER_IMAGE_FILE
|
echo "Saving docker image to "$DOCKER_IMAGE_FILE
|
||||||
docker save -o $DOCKER_IMAGE_FILE $DOCKER_TAG
|
docker save $DOCKER_TAG | gzip > $DOCKER_IMAGE_FILE
|
||||||
|
|
||||||
#mkdir uberjar
|
#mkdir uberjar
|
||||||
#for jar in `cat jars.txt`; do
|
#for jar in `cat jars.txt`; do
|
||||||
|
11
run.sh
Normal file
11
run.sh
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/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
|
Loading…
Reference in New Issue
Block a user