Update .devcontainer
to use nightly docker SDK images (#13128)
This commit is contained in:
parent
6d7e30dbdd
commit
90c7ed615c
|
@ -2,6 +2,7 @@
|
|||
"sdk": {
|
||||
"channel": "release/5.0.1xx-preview7",
|
||||
"packageVersionPattern": "5.0.0-preview.7",
|
||||
"sdkImageVersion": "5.0.100-preview.7",
|
||||
"nextChannel": "net5/preview7"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -157,6 +157,15 @@ function Get-DotnetUpdate {
|
|||
}
|
||||
}
|
||||
|
||||
function Update-DevContainer {
|
||||
$dockerFilePath = "$PSScriptRoot/../.devcontainer/Dockerfile"
|
||||
$sdkImageVersion = (Get-Content -Raw "$PSScriptRoot/../DotnetRuntimeMetadata.json" | ConvertFrom-Json).sdk.sdkImageVersion
|
||||
|
||||
$devContainerDocker = (Get-Content $dockerFilePath) -replace 'FROM mcr\.microsoft\.com/dotnet.*', "FROM mcr.microsoft.com/dotnet/nightly/sdk:$sdkImageVersion"
|
||||
|
||||
$devContainerDocker | Out-File -FilePath $dockerFilePath -Force
|
||||
}
|
||||
|
||||
$dotnetUpdate = Get-DotnetUpdate
|
||||
|
||||
if ($dotnetUpdate.ShouldUpdate) {
|
||||
|
@ -228,4 +237,6 @@ if ($dotnetUpdate.ShouldUpdate) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Update-DevContainer
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue