Skip to content

Commit

Permalink
[Windows] Pin Docker 24.0.7 to avoid bugs (actions#9208)
Browse files Browse the repository at this point in the history
* [Windows] Pin Docker 24.0.7 to avoid bugs

* Fix typos, avoid using special characters
  • Loading branch information
erik-bershel authored Jan 22, 2024
1 parent 17d89db commit 097e28c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
8 changes: 4 additions & 4 deletions images/windows/scripts/build/Install-Docker.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
################################################################################

Write-Host "Get latest Moby release"
$mobyLatestVersion = (Get-GithubReleasesByVersion -Repo "moby/moby" -Version "latest").version

$toolsetVersion = (Get-ToolsetContent).docker.components.docker
$mobyVersion = (Get-GithubReleasesByVersion -Repo "moby/moby" -Version "${toolsetVersion}").version
$dockerceUrl = "https://download.docker.com/win/static/stable/x86_64/"
$dockerceBinaries = Invoke-WebRequest -Uri $dockerceUrl -UseBasicParsing

Write-Host "Check Moby version $mobyLatestVersion"
$mobyRelease = $dockerceBinaries.Links.href -match "${mobyLatestVersion}\.zip" | Select-Object -Last 1
Write-Host "Check Moby version $mobyVersion"
$mobyRelease = $dockerceBinaries.Links.href -match "${mobyVersion}\.zip" | Select-Object -Last 1
if (-not $mobyRelease) {
Write-Host "Release not found for $mobyLatestRelease version"
$versions = [regex]::Matches($dockerceBinaries.Links.href, "docker-(\d+\.\d+\.\d+)\.zip") | Sort-Object { [version] $_.Groups[1].Value }
Expand Down
4 changes: 3 additions & 1 deletion images/windows/scripts/build/Install-DockerCompose.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ Install-ChocoPackage docker-compose -ArgumentList "--version=$versionToInstall"

Write-Host "Install-Package Docker-Compose v2"
# Temporaty pinned to v2.23.3 due https://github.com/actions/runner-images/issues/9172
$dockerComposev2Url = "https://github.com/docker/compose/releases/download/v2.23.3/docker-compose-windows-x86_64.exe"
$toolsetVersion = (Get-ToolsetContent).docker.components.compose
$composeVersion = (Get-GithubReleasesByVersion -Repo "docker/compose" -Version "${toolsetVersion}").version
$dockerComposev2Url = "https://github.com/docker/compose/releases/download/v${composeVersion}/docker-compose-windows-x86_64.exe"
$cliPluginsDir = "C:\ProgramData\docker\cli-plugins"
New-Item -Path $cliPluginsDir -ItemType Directory
Invoke-DownloadWithRetry -Url $dockerComposev2Url -Path "$cliPluginsDir\docker-compose.exe"
Expand Down
6 changes: 5 additions & 1 deletion images/windows/toolsets/toolset-2019.json
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,11 @@
"mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019",
"mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019",
"mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019"
]
],
"components": {
"docker": "24.0.7",
"compose": "2.23.3"
}
},
"pipx": [
{
Expand Down
6 changes: 5 additions & 1 deletion images/windows/toolsets/toolset-2022.json
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,11 @@
"mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2022",
"mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2022",
"mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2022"
]
],
"components": {
"docker": "24.0.7",
"compose": "2.23.3"
}
},
"pipx": [
{
Expand Down

0 comments on commit 097e28c

Please sign in to comment.