Repository navigation
fix(monitoring): name untagged images in Docker Disk Usage - #115
Merged
Merged
Conversation
Docker Disk Usage listed many images as "<none>:<none>" with the subtitle "Dangling local image", including images that running containers use. Docker keeps no tag for an image in two common cases: - the tag moved to a newer pull or build (a redeploy of an application or of the panel itself), while an exited swarm task from the previous deploy still holds the old image; - the image was pulled by digest, as compose does for "name:tag@sha256:" references, so no tag is stored locally at all. The name is now taken from the reference the image's containers were created from (running containers first), and from RepoDigests when no container uses the image. A digest-only name keeps a short digest, so "repo@sha256:<12 chars>". The subtitle says which case it is: "Previous version: the tag now points to another image", "Pulled by digest, no local tag", or "Dangling local image" when nothing uses it. Source lists the references. Containers are now matched to images by image id from docker container inspect. docker ps gives no image id and shows a bare id once the tag has moved, so digest-pinned containers were reported as "no containers reported" before. Used by also marks containers that are not running, e.g. "panel.1.abc (exited)", which shows why an old image is kept. Checked against a real host's data: all 28 untagged images got their names, and Used by matched the CONTAINERS column of docker system df -v. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Docker Disk Usage on the Monitoring page no longer shows untagged images as
<none>:<none>. Each one gets the name it really has, plus a subtitle that says why Docker keeps no tag for it.<none>:<none>· Dangling local imageghcr.io/agenthits/dokploy:agenthits-dev· Previous version: the tag now points to another imageredis:8-alpine@sha256:…)<none>:<none>· Dangling local image · Used by: no containers reportedredis:8-alpine· Pulled by digest, no local tag · Used by: the running containers<none>:<none>registry/app@sha256:<12 chars>· Dangling local imageWhy
Docker drops an image's tag once the tag moves to another image, and it never stores a tag for an image pulled by digest. The image's real name is still in the reference its containers were created from (
Config.Image) and inRepoDigests. The page used only the REPOSITORY/TAG columns ofdocker system df -v.How
RepoDigests.docker container inspect.docker pshas no image id, and it shows a bare id once the tag has moved, so digest-pinned containers used to be missed.panel.1.abc (exited). That is what keeps an old image on disk, and whydocker image pruneleaves it there.Checks
tsc --noEmitforpackages/serverandapps/dokploy, Biome on the changed files: clean.docker system df -v, image inspect and container inspect output from a production host. All 28 untagged images got a name. For all 46 images, the Used by count matched the CONTAINERS column ofdocker system df -v.🤖 Generated with Claude Code