Check WSL updates and force default distribution

This commit is contained in:
Mario Romero 2023-09-06 15:02:42 -03:00
parent 979f886e20
commit 4b5b7b38a2

View File

@ -1,6 +1,12 @@
param([switch] $remote = $false)
Write-Host "OSIC-Stacks Container Creation" -ForegroundColor Green
Write-Host "Checking WSL updates" -ForegroundColor DarkGray
Write-Host ""
wsl --update
Write-Host ""
Write-Host "Please select an image index:"
$imageoptions = @(
@ -38,7 +44,7 @@ $dockercommand = ("docker run -d " +
"-e XDG_RUNTIME_DIR=/mnt/wslg " +
$image)
wsl bash -ic $dockercommand
wsl -d Ubuntu bash -ic $dockercommand
if ($?) {
Write-Host "Container created successfully!" -ForegroundColor Green