From e5c7731ecbc7104425e2f8e45cde921bbf2f8c73 Mon Sep 17 00:00:00 2001 From: b3ni15 Date: Mon, 7 Jul 2025 00:31:30 +0200 Subject: [PATCH] Refactor Dockerfile: remove redundant script and alias for .NET commands, streamline Xvfb initialization --- Dockerfile | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 29eb458..d549009 100644 --- a/Dockerfile +++ b/Dockerfile @@ -92,25 +92,6 @@ RUN Xvfb :99 -screen 0 1024x768x16 & \ && wineserver --wait \ && kill $XVFB_PID || true -# Create a script to run .NET commands with virtual display -RUN echo '#!/bin/bash' > /home/wineuser/run-dotnet.sh \ - && echo 'export DISPLAY=:99' >> /home/wineuser/run-dotnet.sh \ - && echo 'wine dotnet "$@"' >> /home/wineuser/run-dotnet.sh \ - && chmod +x /home/wineuser/run-dotnet.sh - -# Create dotnet alias and add to PATH -RUN echo 'alias dotnet="/home/wineuser/run-dotnet.sh"' >> /home/wineuser/.bashrc \ - && echo 'export PATH="/home/wineuser:$PATH"' >> /home/wineuser/.bashrc \ - && echo 'export DISPLAY=:99' >> /home/wineuser/.bashrc \ - && ln -s /home/wineuser/run-dotnet.sh /home/wineuser/dotnet - -# Start Xvfb automatically when shell starts -RUN echo 'if ! pgrep Xvfb > /dev/null; then' >> /home/wineuser/.bashrc \ - && echo ' echo "Starting Xvfb display server..."' >> /home/wineuser/.bashrc \ - && echo ' Xvfb :99 -screen 0 1024x768x16 &' >> /home/wineuser/.bashrc \ - && echo ' sleep 2' >> /home/wineuser/.bashrc \ - && echo 'fi' >> /home/wineuser/.bashrc - # Set working directory for projects WORKDIR /home/wineuser/projects