Skip to content

Commit

Permalink
更新docker容器日志限制配置
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmzj committed Feb 18, 2018
1 parent 30d87e7 commit 941db15
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 04.docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- hosts: kube-cluster
gather_facts: True
#gather_facts: True
roles:
- docker
10 changes: 8 additions & 2 deletions roles/docker/files/daemon.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"registry-mirrors": ["https://registry.docker-cn.com"],
"max-concurrent-downloads": 6
"registry-mirrors": ["https://registry.docker-cn.com"],
"max-concurrent-downloads": 10,
"log-driver": "json-file",
"log-level": "warn",
"log-opts": {
"max-size": "10m",
"max-file": "3"
}
}
2 changes: 1 addition & 1 deletion roles/docker/templates/docker.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 941db15

Please sign in to comment.