Add a configuration about docker runtime directory

Control the disk space used for Docker images, containers and
volumes is important for us.We need add configuration of
docker daemon to control the disk spaces used for docker images,
containers and volumes.

Change-Id: I3cf99f4e3f62c8406d37201b1cc24a83c68e3b27
Signed-off-by: pengdake <19921207pq@gmail.com>
This commit is contained in:
pengdake 2018-01-13 00:24:48 +08:00
parent 09ca7d66d5
commit f3e19ecf7b
3 changed files with 8 additions and 1 deletions

View File

@ -16,6 +16,8 @@ disable_selinux: True
docker_storage_driver: ""
docker_runtime_directory: ""
debian_pkg_install:
- "{{ 'docker-ce' if ansible_architecture == 'aarch64' else 'docker-engine=1.12.*' }}"
- git

View File

@ -1,4 +1,4 @@
[Service]
MountFlags=shared
ExecStart=
ExecStart=/usr/bin/{{ docker_binary_name|default("docker daemon", true) }}{% if docker_registry %} --insecure-registry {{ docker_registry }}{% endif %}{% if docker_storage_driver %} --storage-driver {{ docker_storage_driver }}{% endif %}
ExecStart=/usr/bin/{{ docker_binary_name|default("docker daemon", true) }}{% if docker_registry %} --insecure-registry {{ docker_registry }}{% endif %}{% if docker_storage_driver %} --storage-driver {{ docker_storage_driver }}{% endif %}{% if docker_runtime_directory %} --graph {{ docker_runtime_directory }}{% endif %}

View File

@ -0,0 +1,5 @@
---
features:
- |
Set docker runtime directory by configure the docker daemon.An operator
named "docker_runtime_directory" will be add.