vim /etc/docker/daemon.json
{
"insecure-registries":["harbor.yunjingtech.cn:30002"],
"log-driver":"json-file",
"log-opts": {"max-size":"100m", "max-file":"3"}
}
#单日志文件最大100m,最多三个日志文件
重启docker:
systemctl daemon-reload
systemctl restart docker.service
原文:https://blog.51cto.com/bilibili/2463286