Skip to content

Fix edgecase docker.io image reported as unused#169

Draft
AiroPi wants to merge 1 commit into
sergi0g:mainfrom
AiroPi:in-use-from-image-id
Draft

Fix edgecase docker.io image reported as unused#169
AiroPi wants to merge 1 commit into
sergi0g:mainfrom
AiroPi:in-use-from-image-id

Conversation

@AiroPi

@AiroPi AiroPi commented May 22, 2026

Copy link
Copy Markdown

Currently, to check if an image is used or not, the reference is checked.

This can cause edge-case issues with docker.io being masked by Docker.

To reproduce you can make this:

docker run docker.io/hello-world:latest

(Note the use of explicit docker.io)

The container will have docker.io/hello-world:latest as image, and the image reference will be hello-world:latest.

This cause the image to be reported as unused because it will test hello-world:latest against docker.io/hello-world:latest which don't match.

To address this issue, I change the comparison to use image id instead. It's my first time with rust btw.

(nb: I was not able to test for swarm so the image id is set as None for now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant