[windows] split docker install into 3 scripts (#8688)

* [windows] split docker install into 3 scripts

the idea is to end with 1 script per 1 component for better
observability

* Update images/win/scripts/Installers/Install-Docker-Compose.ps1

Co-authored-by: Erik Bershel <110455084+erik-bershel@users.noreply.github.com>

* Update images/win/scripts/Installers/Install-Docker-WinCred.ps1

Co-authored-by: Vasilii Polikarpov <126792224+vpolikarpov-akvelon@users.noreply.github.com>

* fix test

---------

Co-authored-by: Erik Bershel <110455084+erik-bershel@users.noreply.github.com>
Co-authored-by: Vasilii Polikarpov <126792224+vpolikarpov-akvelon@users.noreply.github.com>
This commit is contained in:
ilia-shipitsin
2023-11-06 19:40:33 +01:00
committed by GitHub
parent 98c6d29ec9
commit 030fc05665
6 changed files with 77 additions and 55 deletions

View File

@@ -0,0 +1,17 @@
################################################################################
## File: Install-Docker-Compose.ps1
## Desc: Install Docker Compose.
## Supply chain security: Docker Compose v1 - by package manager
################################################################################
Write-Host "Install-Package Docker-Compose v1"
$versionToInstall = Get-LatestChocoPackageVersion -TargetVersion "1.29" -PackageName "docker-compose"
Choco-Install -PackageName docker-compose -ArgumentList "--version=$versionToInstall"
Write-Host "Install-Package Docker-Compose v2"
$dockerComposev2Url = "https://github.com/docker/compose/releases/latest/download/docker-compose-windows-x86_64.exe"
$cliPluginsDir = "C:\ProgramData\docker\cli-plugins"
New-Item -Path $cliPluginsDir -ItemType Directory
Start-DownloadWithRetry -Url $dockerComposev2Url -Name docker-compose.exe -DownloadPath $cliPluginsDir
Invoke-PesterTests -TestFile "Docker" -TestName "DockerCompose"