From ca70979c85d32b7683c6867a30a1a6a34ab0f0a3 Mon Sep 17 00:00:00 2001 From: b3ni15 Date: Mon, 7 Jul 2025 00:23:19 +0200 Subject: [PATCH] Refactor Dockerfile: streamline .NET version verification and remove unnecessary script --- Dockerfile | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index a04fabb..d04e1b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -82,18 +82,13 @@ RUN cd /tmp \ ENV DOTNET_ROOT="$WINEPREFIX/drive_c/Program Files/dotnet" ENV PATH="$DOTNET_ROOT:$PATH" -# Create a script to run .NET commands with virtual display -RUN echo '#!/bin/bash' > /home/wineuser/run-dotnet.sh \ - && echo 'Xvfb :99 -screen 0 1024x768x16 & XVFB_PID=$!' >> /home/wineuser/run-dotnet.sh \ - && echo 'sleep 3' >> /home/wineuser/run-dotnet.sh \ - && echo 'export DISPLAY=:99' >> /home/wineuser/run-dotnet.sh \ - && echo 'wine dotnet "$@"' >> /home/wineuser/run-dotnet.sh \ - && echo 'wineserver --wait' >> /home/wineuser/run-dotnet.sh \ - && 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..." +# Get dotnet version to verify installation +RUN Xvfb :99 -screen 0 1024x768x16 & \ + XVFB_PID=$! \ + && sleep 3 \ + && dotnet --version \ + && wineserver --wait \ + && kill $XVFB_PID || true # Set working directory for projects WORKDIR /home/wineuser/projects