In cases where you are using the defaults for logging and your application logs a lot you can consume a lot of disk space and you can run out of disk space quite quickly.
If it’s a case where you already ran out of disk space, we can investigate the disk space consumed by docker logs:
1 2 3 4 |
|
Referenced from https://blog.birkhoff.me/devops-truncate-docker-container-logs-periodically-to-free-up-server-disk-space/ you can truncate those files:
1
|
|
Check the size again:
1 2 3 |
|
To overcome this issue you can use this in logging options in your compose:
1 2 3 4 5 6 |
|