Sometimes there's a problem where containers taking up all space. The following checklist helps with diagnosing what is the root cause of that.
- Basic commands to check docker status and consumed size
docker system df
docker system df -v
docker container ls -s
- Check docker container log size
container=34443add1c1c
du -h $(dirname $(docker inspect "$container" --format '{{ .LogPath }}'))
If this folder contains large files, most likely container produces massive amount of logs on stdout. A simple solution is to review what's being logger or set a cap to limit log files, for example in docker-compose:
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
- Check docker container
diff
folder (whether there's any additional file structure on writable layer)
du -h $(dirname $(docker inspect "$container" --format '{{ .GraphDriver.Data.MergedDir }}'))/diff
References: