Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WSL #1081

Merged
merged 7 commits into from
Jul 9, 2020
Merged

Add WSL #1081

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion images/win/Windows2019-Azure.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@
],
"execution_policy": "unrestricted"
},
{
"type": "powershell",
"elevated_user": "SYSTEM",
"elevated_password": "",
"scripts":[
"{{ template_dir }}/scripts/Installers/Windows2019/Install-WSL.ps1"
]
},
{
"type": "powershell",
"scripts":[
Expand Down Expand Up @@ -243,6 +251,12 @@
"{{ template_dir }}/scripts/Installers/Validate-Wix.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Validate-WSL.ps1"
]
},
{
"type": "powershell",
"scripts":[
Expand Down Expand Up @@ -1062,4 +1076,4 @@
]
}
]
}
}
14 changes: 14 additions & 0 deletions images/win/scripts/Installers/Validate-WSL.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
################################################################################
## File: Validate-WSL.ps1
## Desc: Validate WSL CLI existst
################################################################################

if (Get-Command -Name 'wsl')
{
Write-Host 'wsl is on path'
}
else
{
Write-Host 'wsl not on path'
exit 1
}
8 changes: 8 additions & 0 deletions images/win/scripts/Installers/Windows2019/Install-WSL.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
################################################################################
## File: Install-WSL.ps1
## Desc: Install Windows Subsystem for Linux
################################################################################

Write-Host "Install Windows Subsystem for Linux"

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ $markdown += New-MDList -Style Unordered -Lines @(
"Image Version: $env:ImageVersion"
)

$markdown += New-MDHeader "Enabled windows optional features" -Level 2
$markdown += New-MDList -Style Unordered -Lines @(
"Windows Subsystem for Linux"
)

$markdown += New-MDHeader "Installed Software" -Level 2
$markdown += New-MDHeader "Language and Runtime" -Level 3

Expand Down