Quick Answer
Docker's GC skips layers still referenced by any image manifest or build cache entry. If a manifest or BuildKit cache entry is corrupted or not properly cleaned up, it holds a reference forever รขโฌโ the layer is never collected. Clearing the build cache (docker builder prune) and dangling images usually resolves stuck GC.
Answer
Running or stopped containers still reference layers until removed.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.