diff options
author | Zen3515 <7106408+Zen3515@users.noreply.github.com> | 2023-01-30 15:58:11 +0700 |
---|---|---|
committer | Zen3515 <7106408+Zen3515@users.noreply.github.com> | 2023-01-30 16:03:15 +0700 |
commit | b17251334c57c2f6875c19ad4e6c6127aa9e1811 (patch) | |
tree | 2937cf711f3641da2d0c174bda72a83ab9b102a1 /data/templates/container | |
parent | 3c750f9b12b54d872848f6571deb02245ba8e28a (diff) | |
download | vyos-1x-b17251334c57c2f6875c19ad4e6c6127aa9e1811.tar.gz vyos-1x-b17251334c57c2f6875c19ad4e6c6127aa9e1811.zip |
container: T4959: Add container registry authentication config for containers
Diffstat (limited to 'data/templates/container')
-rw-r--r-- | data/templates/container/registries.conf.j2 | 7 |
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 }} |