#orphan-layers#windows-docker#docker-cleanup
How to remove orphan layers in docker for windows
by Fabian Holtermann on
Discover how to effectively address the issue of orphan layers in Docker, which can cause file system congestion and resist manual deletion. This concise guide presents a solution to safely remove these lingering layers.
- Orphan layers left by Docker can clutter the file system, posing deletion challenges.
- Manual deletion of these layers risks potential damage to the Docker environment.
- The command
docker system prune -a
fails to resolve this specific issue.
Thanks to Olli Janatuinen's
discovery, a reliable solution has been found.
TL;DR
- Execute the script
Find-OrphanDockerLayers.ps1 -RenameOrphanLayers
. - Make sure that you have your path variables in place:
C:\Program Files\Docker\Docker\resources
- Initiate a Docker daemon with extended shutdown timeout.
dockerd -D --shutdown-timeout 900
- Stop the daemon using "CTRL+C" to trigger the removal of all dangling layers.
Original Post
To access the detailed original post on GitHub, visit: https://github.com/docker/for-win/issues/745#issuecomment-445243539
Attachments