Update Dockerfile

This commit is contained in:
Twig6943 2026-03-27 09:59:46 +03:00 committed by GitHub
parent 8affeaa0f8
commit 49836aeb6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,6 +4,11 @@ ARG DEBIAN_FRONTEND=noninteractive
# basically, it only works with a Release build.(libs are not included in Debug build) # basically, it only works with a Release build.(libs are not included in Debug build)
ARG MC_RUNTIME_DIR=srv/mc ARG MC_RUNTIME_DIR=srv/mc
ENV PROTONPATH=GE-Proton
ENV PROTON_ENABLE_WAYLAND=1
ENV WINEARCH=win64
ENV WINEPREFIX=/var/opt/wineprefix64
RUN dpkg --add-architecture i386 \ RUN dpkg --add-architecture i386 \
&& apt-get update \ && apt-get update \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
@ -37,12 +42,17 @@ RUN set -eux; \
apt-get install -y /tmp/umu-launcher.deb; \ apt-get install -y /tmp/umu-launcher.deb; \
rm -f /tmp/umu-launcher.deb; rm -f /tmp/umu-launcher.deb;
ENV PROTONPATH=GE-Proton # Create user
ENV PROTON_ENABLE_WAYLAND=1 RUN useradd -m -s /bin/bash mclce
ENV WINEARCH=win64
ENV WINEPREFIX=/var/opt/wineprefix64
WORKDIR /srv/mc # Give maxima sudo without password
RUN echo "maxima ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/mclce \
&& chmod 0440 /etc/sudoers.d/mclce
USER mclce
# games dir
RUN sudo chmod 0755 /srv/mc
# latest server build # latest server build
RUN curl -Lo /tmp/LCEServerWindows64.zip \ RUN curl -Lo /tmp/LCEServerWindows64.zip \
@ -56,4 +66,6 @@ RUN chmod 0755 /usr/local/bin/entrypoint.sh \
&& mkdir -p /var/opt/wineprefix64 /srv/mc \ && mkdir -p /var/opt/wineprefix64 /srv/mc \
&& test -f /srv/mc/Minecraft.Server.exe && test -f /srv/mc/Minecraft.Server.exe
WORKDIR /srv/mc
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/entrypoint.sh"] ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/entrypoint.sh"]