更新docker容器日志限制配置

pull/104/head
jmgao 2018-01-29 18:25:27 +08:00
parent 15a4ae943b
commit 61096e90ec
3 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,4 @@
- hosts: kube-cluster
gather_facts: True
#gather_facts: True
roles:
- docker

View File

@ -1,4 +1,10 @@
{
"registry-mirrors": ["https://registry.docker-cn.com"],
"max-concurrent-downloads": 6
"max-concurrent-downloads": 10,
"log-driver": "json-file",
"log-level": "warn",
"log-opts": {
"max-size": "10m",
"max-file": "3"
}
}

View File

@ -4,7 +4,7 @@ Documentation=http://docs.docker.io
[Service]
Environment="PATH={{ bin_dir }}:/bin:/sbin:/usr/bin:/usr/sbin"
ExecStart={{ bin_dir }}/dockerd --log-level=error
ExecStart={{ bin_dir }}/dockerd
ExecStartPost=/sbin/iptables -I FORWARD -s 0.0.0.0/0 -j ACCEPT
ExecReload=/bin/kill -s HUP $MAINPID
Restart=on-failure