Create a file named daemon.json under /etc/docker and add the following configuration
{
"log-driver": "json-file",
"log-opts": {
"max-size": "1000m",
"max-file": "10"
}
}
Use max-size and max-file parameters according to the disk space size of your docker partition.
Restart docker services to apply changes.
Refer to official docker documentation for extra settings
https://docs.docker.com/engine/logging/drivers/json-file/
Comments
0 comments
Please sign in to leave a comment.