mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
[Windows] Rename and refactor downloading function (#8906)
This commit is contained in:
committed by
GitHub
parent
bfe32a2b12
commit
7dba8776df
@@ -21,14 +21,14 @@ if (-not $mobyRelease) {
|
||||
$mobyReleaseUrl = $dockerceUrl + $mobyRelease
|
||||
|
||||
Write-Host "Install Moby $mobyRelease..."
|
||||
$mobyArchivePath = Start-DownloadWithRetry -Url $mobyReleaseUrl -Name $mobyRelease
|
||||
$mobyArchivePath = Invoke-DownloadWithRetry $mobyReleaseUrl
|
||||
Expand-Archive -Path $mobyArchivePath -DestinationPath $env:TEMP
|
||||
$dockerPath = "$env:TEMP\docker\docker.exe"
|
||||
$dockerdPath = "$env:TEMP\docker\dockerd.exe"
|
||||
|
||||
Write-Host "Install Docker CE"
|
||||
$instScriptUrl = "https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-DockerCE/install-docker-ce.ps1"
|
||||
$instScriptPath = Start-DownloadWithRetry -Url $instScriptUrl -Name "install-docker-ce.ps1"
|
||||
$instScriptPath = Invoke-DownloadWithRetry $instScriptUrl
|
||||
& $instScriptPath -DockerPath $dockerPath -DockerDPath $dockerdPath
|
||||
if ($LastExitCode -ne 0) {
|
||||
Write-Host "Docker installation failed with exit code $LastExitCode"
|
||||
|
||||
Reference in New Issue
Block a user