docker日志配置
创建时间:2024-03-05 11:36:10
栏目:docker
单个
docker run --log-driver json-file --log-opt max-size=50m nginx
全局配置修改/etc/docker/daemon.json
并重启docker
{
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "3"
}
}