Refactor Dockerfile: streamline .NET version verification and remove unnecessary script

This commit is contained in:
2025-07-07 00:23:19 +02:00
parent adc4393c88
commit ca70979c85

View File

@@ -82,18 +82,13 @@ RUN cd /tmp \
ENV DOTNET_ROOT="$WINEPREFIX/drive_c/Program Files/dotnet" ENV DOTNET_ROOT="$WINEPREFIX/drive_c/Program Files/dotnet"
ENV PATH="$DOTNET_ROOT:$PATH" ENV PATH="$DOTNET_ROOT:$PATH"
# Create a script to run .NET commands with virtual display # Get dotnet version to verify installation
RUN echo '#!/bin/bash' > /home/wineuser/run-dotnet.sh \ RUN Xvfb :99 -screen 0 1024x768x16 & \
&& echo 'Xvfb :99 -screen 0 1024x768x16 & XVFB_PID=$!' >> /home/wineuser/run-dotnet.sh \ XVFB_PID=$! \
&& echo 'sleep 3' >> /home/wineuser/run-dotnet.sh \ && sleep 3 \
&& echo 'export DISPLAY=:99' >> /home/wineuser/run-dotnet.sh \ && dotnet --version \
&& echo 'wine dotnet "$@"' >> /home/wineuser/run-dotnet.sh \ && wineserver --wait \
&& echo 'wineserver --wait' >> /home/wineuser/run-dotnet.sh \ && kill $XVFB_PID || true
&& echo 'kill $XVFB_PID || true' >> /home/wineuser/run-dotnet.sh \
&& chmod +x /home/wineuser/run-dotnet.sh
# Verify installation
RUN /home/wineuser/run-dotnet.sh --version || echo "Installation verification failed, but continuing..."
# Set working directory for projects # Set working directory for projects
WORKDIR /home/wineuser/projects WORKDIR /home/wineuser/projects