From 36d1034600b6b92f4d2d364151863539ac72676f Mon Sep 17 00:00:00 2001 From: lusyoe Date: Wed, 29 Aug 2018 22:12:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0docker=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/docker/defaults/main.yml | 3 +++ roles/docker/templates/daemon.json.j2 | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml index 73d1ad2bb..707ccafdd 100644 --- a/roles/docker/defaults/main.yml +++ b/roles/docker/defaults/main.yml @@ -9,3 +9,6 @@ LOG_DRIVER: "json-file" LOG_LEVEL: "warn" LOG_MAX_SIZE: "10m" LOG_MAX_FILE: 3 + +# docker容器存储目录 +STORAGE_DIR: "/var/lib/docker" diff --git a/roles/docker/templates/daemon.json.j2 b/roles/docker/templates/daemon.json.j2 index d30d72af9..92e284fb1 100644 --- a/roles/docker/templates/daemon.json.j2 +++ b/roles/docker/templates/daemon.json.j2 @@ -6,5 +6,6 @@ "log-opts": { "max-size": "{{ LOG_MAX_SIZE }}", "max-file": "{{ LOG_MAX_FILE }}" - } + }, + "graph": "{{ STORAGE_DIR }}" }