Docker running on Ubuntu is taking 18G of disk space (on a partition of 20G), causing server crashes. Commands below show that there is a serious mismatch between "official" image, container and volume sizes and the docker folder size.
What causes this and how can I cleanup ?
I already tried docker system prune
which doesn't help.
du -sh /var/lib/docker
docker system df
du -sh /var/lib/docker/*
du -sh /var/lib/docker/containers/*
I was having the same problem. I solved my problem by deleting log files
sudo sh -c "truncate -s 0 /var/lib/docker/containers/*/*-json.log"
Link: How to clear the logs properly for a Docker container?
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