[windows] add ip substitution to update-dockerimages (#2611)

This commit is contained in:
Mikhail Timofeev
2021-02-04 10:39:20 +03:00
committed by GitHub
parent 36182c1a2b
commit aa0de6b9cc

View File

@@ -16,9 +16,14 @@ function DockerPull {
}
}
# Temporary replace ip for download server to the more stable one
Copy-Item -Path "$env:windir\System32\drivers\etc\hosts" -Destination "C:\hosts_backup" -Verbose
"40.71.10.214 mcr.microsoft.com" >> "$env:windir\System32\drivers\etc\hosts"
$dockerToolset = (Get-ToolsetContent).docker
foreach($dockerImage in $dockerToolset.images) {
DockerPull $dockerImage
}
Move-Item -Path "C:\hosts_backup" -Destination "$env:windir\System32\drivers\etc\hosts" -Force -Verbose
Invoke-PesterTests -TestFile "Docker" -TestName "DockerImages"