Docker Logging
Related to:: Docker - Docker Maintenance CheatSheet and Tips
There are docker logs that can grow to fill all available disk space if you don’t prevent it.
For it, we can use the max-size
on the( daemon configs runtime or compose / stack).
The log file is located inside the container folder and the default one is a JSON file.
/var/lib/docker/containers/CONTAINERUUID/CONTAINERUUID-json.log
We can set it to
logging:
options:
max-size: 50m
On Portainer, we can set it on the stacks or on the container create/edit page.