Refactor Dockerfile and entrypoint script: update DotNet installation process, switch to Wine development version, and streamline Wine initialization

This commit is contained in:
2025-07-07 14:07:45 +02:00
parent 87a1ee9295
commit c8c901bd7f
2 changed files with 25 additions and 36 deletions

View File

@@ -10,7 +10,7 @@ RUN apt update -y \
&& wget https://dot.net/v1/dotnet-install.sh \
&& D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/9.0 | grep -i '<h3 id="sdk-9.*">SDK 9.*.*</h3>' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh -i /usr/share -v $D_V \
&& ./dotnet-install.sh -i /usr/share -v $D_V \
&& ln -s /usr/share/dotnet /usr/bin/dotnet
# Install Wine and dependencies
@@ -20,12 +20,13 @@ RUN dpkg --add-architecture i386 \
&& wget -qO - https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor -o /usr/share/keyrings/winehq-archive-keyring.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/winehq-archive-keyring.gpg] https://dl.winehq.org/wine-builds/debian/ bullseye main" >> /etc/apt/sources.list.d/winehq.list \
&& apt update -y \
&& apt install -y winehq-stable \
&& apt install -y --install-recommends winehq-devel \
&& apt install -y xvfb cabextract \
&& wget -q https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks -O /usr/local/bin/winetricks \
&& chmod +x /usr/local/bin/winetricks \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/*
USER container
ENV USER=container HOME=/home/container
@@ -33,6 +34,7 @@ ENV USER=container HOME=/home/container
ENV WINEARCH=win64
ENV WINEPREFIX=/home/container/.wine
ENV DISPLAY=:99.0
ENV WINEDLLOVERRIDES="mscoree,mshtml="
WORKDIR /home/container
@@ -40,5 +42,5 @@ STOPSIGNAL SIGINT
COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
CMD ["/entrypoint.sh"]