Files
dotnet-wine/README.md
B3ni 4e18d0fac1 Enhance Dockerfile and README for Wine + .NET SDK setup
- Updated Dockerfile to include necessary X11 packages for Wine.
- Improved initialization of Wine prefix with virtual display.
- Modified .NET installation to utilize virtual display.
- Updated README to reflect changes in usage instructions and removed PowerShell build instructions.
2025-07-06 23:58:07 +02:00

1.6 KiB

Wine + .NET SDK Docker Image

Ez a Docker image telepíti a Wine 64-bit verzióját és a Microsoft .NET SDK 9.0.301-et Windows-on keresztül.

Tartalom

  • Ubuntu 22.04 alapú image
  • Wine 64-bit (stable verzió)
  • .NET SDK 9.0.301 (Windows x64)

Build

Bash-sel (Git Bash, WSL, Linux, macOS):

chmod +x build.sh
./build.sh

Manuálisan:

docker build -t wine-dotnet:latest .

Használat

Alapvető futtatás:

docker run -it --rm wine-dotnet:latest

Projektekkel való munka (volume mounting):

docker run -it --rm -v $(pwd)/projects:/home/wineuser/projects wine-dotnet:latest

Windows PowerShell-ben:

docker run -it --rm -v ${PWD}/projects:/home/wineuser/projects wine-dotnet:latest

.NET használata a containerben

A containerben belül használhatod a .NET SDK-t a speciális script segítségével:

# .NET verzió ellenőrzése
./run-dotnet.sh --version

# Új projekt létrehozása
./run-dotnet.sh new console -n MyApp

# Projekt build-elése
cd MyApp
../run-dotnet.sh build

# Projekt futtatása
../run-dotnet.sh run

Alternatívaként közvetlenül is használhatod:

# Virtual display indítása
Xvfb :99 -screen 0 1024x768x16 &
export DISPLAY=:99

# .NET parancsok
wine dotnet --version

Megjegyzések

  • A container egy wineuser felhasználóval fut (nem root)
  • A Wine prefix előre konfigurálva van 64-bit módban
  • A .NET SDK csendben telepítve van virtual display segítségével
  • A projektek a /home/wineuser/projects könyvtárban tárolhatók
  • A run-dotnet.sh script automatikusan kezeli a virtual display-t