summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2024-04-23 00:37:36 +0200
committerBotond Hende <nettingman@gmail.com>2024-04-23 00:37:36 +0200
commita033fb87d18f762b33bea2d2b95d39270204328e (patch)
tree5074c3fea39563e320dd5410f47ca9a675e6f725
parent408ace2b1031b152baf55a01e490f227fa3b5437 (diff)
fixed up paths
-rw-r--r--Dockerfile12
-rw-r--r--start.sh4
2 files changed, 9 insertions, 7 deletions
diff --git a/Dockerfile b/Dockerfile
index 4debfb6..68cb468 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -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"]
diff --git a/start.sh b/start.sh
index ec22d03..b33dd22 100644
--- a/start.sh
+++ b/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