Merge pull request #3730 from elementyang/pr-docker-options

fix modify deprecated --graph flag
This commit is contained in:
Rong Zhang 2018-11-20 10:23:16 +08:00 committed by GitHub
commit b4eb25197b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -57,7 +57,11 @@ docker_options: >-
{% if docker_registry_mirrors is defined -%} {% if docker_registry_mirrors is defined -%}
{{ docker_registry_mirrors | map('regex_replace', '^(.*)$', '--registry-mirror=\1' ) | list | join(' ') }} {{ docker_registry_mirrors | map('regex_replace', '^(.*)$', '--registry-mirror=\1' ) | list | join(' ') }}
{%- endif %} {%- endif %}
{%- if docker_version is version('17.05', '<') -%}
--graph={{ docker_daemon_graph }} {{ docker_log_opts }} --graph={{ docker_daemon_graph }} {{ docker_log_opts }}
{%- else -%}
--data-root={{ docker_daemon_graph }} {{ docker_log_opts }}
{%- endif %}
{%- if ansible_architecture == "aarch64" and ansible_os_family == "RedHat" %} {%- if ansible_architecture == "aarch64" and ansible_os_family == "RedHat" %}
--add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current
--default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd

View file

@ -213,7 +213,11 @@ docker_options: >-
{% if docker_registry_mirrors is defined -%} {% if docker_registry_mirrors is defined -%}
{{ docker_registry_mirrors | map('regex_replace', '^(.*)$', '--registry-mirror=\1' ) | list | join(' ') }} {{ docker_registry_mirrors | map('regex_replace', '^(.*)$', '--registry-mirror=\1' ) | list | join(' ') }}
{%- endif %} {%- endif %}
{%- if docker_version is version('17.05', '<') -%}
--graph={{ docker_daemon_graph }} {{ docker_log_opts }} --graph={{ docker_daemon_graph }} {{ docker_log_opts }}
{%- else -%}
--data-root={{ docker_daemon_graph }} {{ docker_log_opts }}
{%- endif %}
{%- if ansible_architecture == "aarch64" and ansible_os_family == "RedHat" %} {%- if ansible_architecture == "aarch64" and ansible_os_family == "RedHat" %}
--add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current
--default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd