1.3 KiB
1.3 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
Windows PowerShell-lel:
.\build.ps1
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:
# .NET verzió ellenőrzése
wine dotnet --version
# Új projekt létrehozása
wine dotnet new console -n MyApp
# Projekt build-elése
cd MyApp
wine dotnet build
# Projekt futtatása
wine dotnet run
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
- A projektek a
/home/wineuser/projects
könyvtárban tárolhatók