Add registry_mirrors config to docker options
This commit is contained in:
parent
c41ca22a78
commit
cb133cba68
1 changed files with 8 additions and 0 deletions
|
@ -25,6 +25,11 @@ docker_bin_dir: "/usr/bin"
|
||||||
# - mirror.registry.io
|
# - mirror.registry.io
|
||||||
# - 172.19.16.11
|
# - 172.19.16.11
|
||||||
|
|
||||||
|
## Add other registry,example China registry mirror.
|
||||||
|
#registry_mirrors:
|
||||||
|
# - https://registry.docker-cn.com
|
||||||
|
# - https://mirror.aliyuncs.com
|
||||||
|
|
||||||
## If non-empty will override default system MounFlags value.
|
## If non-empty will override default system MounFlags value.
|
||||||
## This option takes a mount propagation flag: shared, slave
|
## This option takes a mount propagation flag: shared, slave
|
||||||
## or private, which control whether mounts in the file system
|
## or private, which control whether mounts in the file system
|
||||||
|
@ -38,6 +43,9 @@ docker_options: >-
|
||||||
{%- if insecure_registries is defined -%}
|
{%- if insecure_registries is defined -%}
|
||||||
{{ insecure_registries | map('regex_replace', '^(.*)$', '--insecure-registry=\1' ) | list | join(' ') }}
|
{{ insecure_registries | map('regex_replace', '^(.*)$', '--insecure-registry=\1' ) | list | join(' ') }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
{% if registry_mirrors is defined -%}
|
||||||
|
{{ registry_mirrors | map('regex_replace', '^(.*)$', '--registry-mirror=\1' ) | list | join(' ') }}
|
||||||
|
{%- endif %}
|
||||||
--graph={{ docker_daemon_graph }} {{ docker_log_opts }}
|
--graph={{ docker_daemon_graph }} {{ docker_log_opts }}
|
||||||
{%- 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
|
||||||
|
|
Loading…
Reference in a new issue