summaryrefslogtreecommitdiff
path: root/data/templates/container
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-02-09 07:30:59 +0100
committerGitHub <noreply@github.com>2023-02-09 07:30:59 +0100
commit10ab68a018dd137ee9a6350c131f65ec6e12e446 (patch)
treef8949f3e65c3772599eabe4bf219d60d22d6709c /data/templates/container
parent707688894c1a02953b62eadb318b0ee398c799dd (diff)
parentb17251334c57c2f6875c19ad4e6c6127aa9e1811 (diff)
downloadvyos-1x-10ab68a018dd137ee9a6350c131f65ec6e12e446.tar.gz
vyos-1x-10ab68a018dd137ee9a6350c131f65ec6e12e446.zip
Merge pull request #1790 from Zen3515/current-add-container-login
container: T4959: Add container registry authentication config for containers
Diffstat (limited to 'data/templates/container')
-rw-r--r--data/templates/container/registries.conf.j27
1 files changed, 6 insertions, 1 deletions
diff --git a/data/templates/container/registries.conf.j2 b/data/templates/container/registries.conf.j2
index 2e86466a1..4dffae838 100644
--- a/data/templates/container/registries.conf.j2
+++ b/data/templates/container/registries.conf.j2
@@ -22,6 +22,11 @@
# An array of host[:port] registries to try when pulling an unqualified image, in order.
# unqualified-search-registries = ["example.com"]
+{% set registry_value = [] %}
+{% if default_registry is vyos_defined %}
+{% set registry_value = default_registry %}
+{% endif %}
{% if registry is vyos_defined %}
-unqualified-search-registries = {{ registry }}
+{% set registry_value = ((registry_value + (registry.keys() | list)) | unique | list) %}
{% endif %}
+unqualified-search-registries = {{ registry_value | tojson }}