diff options
-rw-r--r-- | data/templates/container/registries.conf.j2 | 6 | ||||
-rw-r--r-- | interface-definitions/container.xml.in | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/data/templates/container/registries.conf.j2 b/data/templates/container/registries.conf.j2 index eb7ff8775..48b3c7c4a 100644 --- a/data/templates/container/registries.conf.j2 +++ b/data/templates/container/registries.conf.j2 @@ -28,4 +28,10 @@ {% set _ = registry_list.append(r) %} {% endfor %} unqualified-search-registries = {{ registry_list }} +{% for r, r_options in registry.items() if r_options.disable is not vyos_defined %} +[[registry]] +location = "{{ r_options.mirror if r_options.mirror is vyos_defined else r }}" +insecure = {{ 'true' if r_options.insecure is vyos_defined else 'false' }} +prefix = "{{ r }}" +{% endfor %} {% endif %} diff --git a/interface-definitions/container.xml.in b/interface-definitions/container.xml.in index 04318a7c9..8752f5f4d 100644 --- a/interface-definitions/container.xml.in +++ b/interface-definitions/container.xml.in @@ -538,6 +538,17 @@ <children> #include <include/interface/authentication.xml.i> #include <include/generic-disable-node.xml.i> + <leafNode name="insecure"> + <properties> + <help>Use HTTP instead of HTTPS</help> + <valueless/> + </properties> + </leafNode> + <leafNode name="mirror"> + <properties> + <help>Registry mirror, use host:port</help> + </properties> + </leafNode> </children> </tagNode> </children> |