We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58b4c7e commit c2461c2Copy full SHA for c2461c2
src/ImageDetector.ts
@@ -10,7 +10,7 @@ export class ImageDetector {
10
11
async getExistingImages(): Promise<string[]> {
12
const ids = (await exec.exec(`docker image ls -q`, [], { silent: true })).stdoutStr.split(`\n`).filter(id => id !== ``)
13
- const repotags = (await exec.exec(`sh -c "docker image ls --all --format '{{ .Repository }}:{{ .Tag }}'"`, [], { silent: true })).stdoutStr.split(`\n`).filter(id => id !== `` || !id.includes(`<none>`));
+ const repotags = (await exec.exec(`sh -c "docker image ls --format '{{ .Repository }}:{{ .Tag }}' --filter 'dangling=false'"`, [], { silent: true })).stdoutStr.split(`\n`).filter(id => id !== ``);
14
([...ids, ...repotags]).forEach(image => this.existingImages.add(image))
15
core.debug(JSON.stringify({ existingImages: this.existingImages }))
16
return Array.from(this.existingImages)
0 commit comments