Edit the daemon configuration file: $ vim /etc/docker/daemon.json Add the following lines to file: { "log-driver": "json-file", "log-opts": { "max-size": "10m", "max-file": "3" } } Restart the docker daemon: systemctl restart docker Chinese File with mirrors { "log-driver": "json-file", "log-opts": { "max-size": "10m", "max-file": "3" }, "registry-mirrors": [ "https://dockerhub.azk8s.cn", "https://n6mdpfki.mirror.aliyuncs.com", "https://reg-mirror.qiniu.com", "http://hub-mirror.c.163.com", "https://docker.mirrors.ustc.edu.cn", "https://registry.docker-cn.com" ] }