Docker: how to clean container temp files
If your docker disk usage is too large, try this:

1. Find the cointainer which has a large size:
docker system df -v

2. Use that container in the command below:
docker exec <container> /bin/bash -c 'rm -rf /tmp/.*'

That saved me >37GB.

(Also posted on Docker Forum.)

P.S. to exclude . and .. and avoid warning messages, you can use:

docker exec <container> /bin/bash -c 'rm -rf tmp/.[!.]* tmp/..?* tmp/*'
blog comments powered by Disqus
Login:
Senha:
Para logar, você precisa ter o Javascript habilitado.