Fix docker_options definition when docker_version is 'latest' rather than a number (#3919)

- NOTE: it assumes that the 'latest' version is newer than 17.05
This commit is contained in:
Hedayat Vatankhah (هدایت) 2018-12-20 12:28:21 +03:30 committed by Kubernetes Prow Robot
parent 40feb120e4
commit fbe9e0ac1a
2 changed files with 2 additions and 2 deletions

View file

@ -57,7 +57,7 @@ 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', '<') %} {%- if docker_version != "latest" and docker_version is version('17.05', '<') %}
--graph={{ docker_daemon_graph }} {{ docker_log_opts }} --graph={{ docker_daemon_graph }} {{ docker_log_opts }}
{%- else %} {%- else %}
--data-root={{ docker_daemon_graph }} {{ docker_log_opts }} --data-root={{ docker_daemon_graph }} {{ docker_log_opts }}

View file

@ -216,7 +216,7 @@ 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', '<') %} {%- if docker_version != "latest" and docker_version is version('17.05', '<') %}
--graph={{ docker_daemon_graph }} {{ docker_log_opts }} --graph={{ docker_daemon_graph }} {{ docker_log_opts }}
{%- else %} {%- else %}
--data-root={{ docker_daemon_graph }} {{ docker_log_opts }} --data-root={{ docker_daemon_graph }} {{ docker_log_opts }}