What are dangling Docker images and how do you clean them up?
Dangling images are layers that have no associated tag — they appear as <none>:<none> in docker images. They accumulate over time from rebuilds and waste disk space.
# List dangling images
docker images -f dangling=true
# Remove all dangling images
docker image prune
# Nuclear option — remove all unused images, containers, networks, volumes
docker system prune -a --volumes
In CI/CD pipelines, always run docker system prune -f as a post-step to keep agents clean.