diff --git a/defaults/main.yml b/defaults/main.yml index 1623a61..842164f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -37,3 +37,11 @@ docker_python_libraries: - jsondiff - requests==2.31 - docker-compose + +docker_set_registry_mirrors: false + +docker_registry_mirrors: + - https:\/\/mirror.gcr.io + - https:\/\/public.ecr.aws + - https:\/\/dh-mirror.gitverse.ru + - https:\/\/registry.redhat.io diff --git a/templates/daemon-json.j2 b/templates/daemon-json.j2 index 92447c1..4168997 100644 --- a/templates/daemon-json.j2 +++ b/templates/daemon-json.j2 @@ -9,7 +9,7 @@ {% endif %} {% if insecure_registries is defined %} "insecure-registries" : [{% for registry in insecure_registries %}"{{ registry }}"{% if not loop.last %}, {% endif %}{% endfor %}], {% endif %} -{% if registry_mirrors is defined %} "registry-mirrors": [{% for registry in registry_mirrors %}"{{ registry }}"{% if not loop.last %}, {% endif %}{% endfor %}], +{% if docker_set_registry_mirrors %} "registry-mirrors": [{% for registry in docker_registry_mirrors %}"{{ registry }}"{% if not loop.last %}, {% endif %}{% endfor %}], {% endif %} "log-opts": { "compress": "{{ log.compress | default('false') }}",