From f57af276472c68c0c5d6d3907cb0e7f5d2b906fb Mon Sep 17 00:00:00 2001 From: ACoolName Date: Sun, 12 May 2024 13:53:23 +0300 Subject: [PATCH] updated dockerfiles --- breath-of-the-wild-multiplayer/Dockerfile | 21 ++++++++++++++------- minecraft/paper/Dockerfile | 2 +- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/breath-of-the-wild-multiplayer/Dockerfile b/breath-of-the-wild-multiplayer/Dockerfile index 60d56a4..63bd497 100644 --- a/breath-of-the-wild-multiplayer/Dockerfile +++ b/breath-of-the-wild-multiplayer/Dockerfile @@ -4,11 +4,18 @@ LABEL type=GAME ENV DISPLAY :0 WORKDIR /opt -RUN dpkg --add-architecture i386 && apt-get update && apt-get upgrade -y && apt-get install -y dotnet6 -COPY server-files /opt/botwm -WORKDIR /opt/botwm -RUN useradd botwm -d /opt -RUN chown -R botwm:botwm /opt -WORKDIR /opt/botwm +RUN dpkg --add-architecture i386 && apt-get update && apt-get upgrade -y && apt-get install -y wget libicu74 +RUN useradd botwm -d /opt && chown -R botwm:botwm /opt + USER botwm:botwm -ENTRYPOINT [ "dotnet", "BOTW.DedicatedServer.dll" ] +RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh && chmod +x ./dotnet-install.sh && DOTNET_ROOT=/opt/.dotnet ./dotnet-install.sh --channel 6.0 + +COPY server-files /opt/botwm + +USER root:root +RUN chown -R botwm:botwm /opt + +USER botwm:botwm +WORKDIR /opt/botwm +WORKDIR /opt/botwm +ENTRYPOINT [ "/opt/.dotnet/dotnet", "BOTW.DedicatedServer.dll" ] diff --git a/minecraft/paper/Dockerfile b/minecraft/paper/Dockerfile index 68ca4a1..ac65416 100644 --- a/minecraft/paper/Dockerfile +++ b/minecraft/paper/Dockerfile @@ -15,7 +15,7 @@ RUN if [[ -z $VERSION ]] ; then VERSION=$(curl https://api.papermc.io/v2/project ) COPY eula.txt eula.txt RUN adduser -D minecraft -h /opt/server -RUN chmod 111 server.jar +RUN chmod 111 server.jar && chown -R minecraft:minecraft /opt/server && chmod -R 770 /opt/server USER minecraft:minecraft ENTRYPOINT [ "java", "-jar", "server.jar" ] LABEL type=GAME