diff --git a/inventory/sample/group_vars/all/docker.yml b/inventory/sample/group_vars/all/docker.yml index cea860c36..b32b55253 100644 --- a/inventory/sample/group_vars/all/docker.yml +++ b/inventory/sample/group_vars/all/docker.yml @@ -25,6 +25,11 @@ docker_bin_dir: "/usr/bin" # - mirror.registry.io # - 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. ## This option takes a mount propagation flag: shared, slave ## or private, which control whether mounts in the file system @@ -38,6 +43,9 @@ docker_options: >- {%- if insecure_registries is defined -%} {{ insecure_registries | map('regex_replace', '^(.*)$', '--insecure-registry=\1' ) | list | join(' ') }} {%- endif %} + {% if registry_mirrors is defined -%} + {{ registry_mirrors | map('regex_replace', '^(.*)$', '--registry-mirror=\1' ) | list | join(' ') }} + {%- endif %} --graph={{ docker_daemon_graph }} {{ docker_log_opts }} {%- if ansible_architecture == "aarch64" and ansible_os_family == "RedHat" %} --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current