From e2acba1767c5b88e1e58b90250166116c86d9699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 29 Oct 2024 15:44:01 +0100 Subject: [PATCH] docker/install: Fix lima failing to download latest Docker archive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the actual version number resolved from the Github releases instead of the `latest` string. Signed-off-by: Paweł Gronowski --- __tests__/docker/install.test.itg.ts | 1 + src/docker/install.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/__tests__/docker/install.test.itg.ts b/__tests__/docker/install.test.itg.ts index 822da611..42750260 100644 --- a/__tests__/docker/install.test.itg.ts +++ b/__tests__/docker/install.test.itg.ts @@ -44,6 +44,7 @@ aarch64:https://cloud.debian.org/images/cloud/bookworm/20231013-1532/debian-12-g {type: 'image', tag: '27.3.1'} as InstallSourceImage, {type: 'image', tag: 'master'} as InstallSourceImage, {type: 'archive', version: 'v26.1.4', channel: 'stable'} as InstallSourceArchive, + {type: 'archive', version: 'latest', channel: 'stable'} as InstallSourceArchive, ])( 'install docker %s', async (source) => { if (process.env.ImageOS && process.env.ImageOS.startsWith('ubuntu')) { diff --git a/src/docker/install.ts b/src/docker/install.ts index d2c89a36..a6c8ca8d 100644 --- a/src/docker/install.ts +++ b/src/docker/install.ts @@ -230,7 +230,7 @@ export class Install { daemonConfig: limaDaemonConfig, dockerSock: `${limaDir}/docker.sock`, srcType: src.type, - srcArchiveVersion: srcArchive.version?.replace(/^v/, ''), + srcArchiveVersion: this._version, // Use the resolved version (e.g. latest -> 27.4.0) srcArchiveChannel: srcArchive.channel, srcImageTag: (src as InstallSourceImage).tag });