My server is CoreOS. There are so many files in /var/lib/docker/tmp
, their name's like "GetV2ImageBlob998303926
".
The size of all GetV2ImageBlobxxxxxxxx
files is 640MB.
Can I remove all files in /var/lib/docker/tmp
?
A stopped container's writable layers still take up disk space. To clean this up, you can use the docker container prune command. By default, you are prompted to continue. To bypass the prompt, use the -f or --force flag.
Whenever we need to completely refresh docker to a clean state, then it is recommended to delete the entire directory, not just sub-directories like overlay2.
If we do not want to find dangling images and remove them one by one, we can use the docker image prune command. This command removes all dangling images. If we also want to remove unused images, we can use the -a flag. The command will return the list of image IDs that were removed and the space that was freed.
This is reported in issues/14506, and addressed in PR 14389, now PR 15414.
Ensure images downloaded by pullTagV2 are always cleaned up
Previously, if only some of the downloads succeed, we would not close and delete the file handles. This does change the behavior of the registration to block on all downloads completing (whereas previously it would exit early after the first failure), which is necessary to ensure cleanup is only performed after the download portion has completed.
That will be fixed in Docker 1.8 or 1.9
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With