updated dockerfiles

This commit is contained in:
ACoolName 2024-05-12 13:53:23 +03:00
parent 6ea8e6e337
commit f57af27647
2 changed files with 15 additions and 8 deletions

View File

@ -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" ]

View File

@ -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