diff options
-rw-r--r-- | Dockerfile | 12 | ||||
-rw-r--r-- | start.sh | 4 |
2 files changed, 9 insertions, 7 deletions
@@ -3,7 +3,7 @@ FROM docker.io/alpine:latest MAINTAINER Hende, Botond <nettingman@gmail.com> LABEL Description="PaperMC server" -RUN apk add --no-cache --virtual container-buildtime jq +RUN apk add --no-cache --virtual container-buildtime jq curl RUN apk add --no-cache openjdk21 RUN mkdir /opt/minecraft @@ -14,13 +14,15 @@ RUN /tmp/papermc/papermc_getlatest.sh RUN rm -rf /tmp/papermc COPY start.sh /opt/minecraft/start.sh -RUN chown -R nobody:nobody /opt/minecraft + +RUN addgroup -S minecraft && adduser -S minecraft -G minecraft +RUN chown -R minecraft:minecraft /opt/minecraft RUN apk del container-buildtime -WORKDIR /opt/minecraft -USER guest -EXPOSE 9001/tcp +WORKDIR /opt/minecraft/world +USER minecraft +EXPOSE 23673/tcp CMD ["/opt/minecraft/start.sh"] @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/ash -java -Xmx2048M -Xms2048M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui
\ No newline at end of file +java -Xmx2048M -Xms2048M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar ../server.jar nogui |