diff --git a/src/platform.js b/src/platform.js index 2b35b05a5..a915e549e 100644 --- a/src/platform.js +++ b/src/platform.js @@ -62,7 +62,8 @@ async function pruneInfraImages() { for (const line of lines) { if (!line) continue; const [, repo, tag, digest] = line.split(' '); // [ ID, Repo, Tag, Digest ] - if (!parsedTag.repository.endsWith(repo)) continue; // some other repo + const normalizedRepo = repo.replace('registry.ipv6.docker.com/', '').replace('registry-1.docker.io/', '').replace('registry.docker.com/', ''); + if (!parsedTag.repository.endsWith(normalizedRepo)) continue; // some other repo if (imageName === `${repo}:${tag}@${digest}`) continue; // the image we want to keep const imageIdToPrune = tag === '' ? `${repo}@${digest}` : `${repo}:${tag}`; // untagged, use digest