mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
[windows] add ip substitution to update-dockerimages (#2611)
This commit is contained in:
@@ -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
|
$dockerToolset = (Get-ToolsetContent).docker
|
||||||
foreach($dockerImage in $dockerToolset.images) {
|
foreach($dockerImage in $dockerToolset.images) {
|
||||||
DockerPull $dockerImage
|
DockerPull $dockerImage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Move-Item -Path "C:\hosts_backup" -Destination "$env:windir\System32\drivers\etc\hosts" -Force -Verbose
|
||||||
Invoke-PesterTests -TestFile "Docker" -TestName "DockerImages"
|
Invoke-PesterTests -TestFile "Docker" -TestName "DockerImages"
|
||||||
Reference in New Issue
Block a user