Update .devcontainer to use nightly docker SDK images (#13128)

This commit is contained in:
Aditya Patwardhan 2020-07-07 16:30:00 -07:00 committed by GitHub
parent 6d7e30dbdd
commit 90c7ed615c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -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"
}
}

View file

@ -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
}