diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-14 17:42:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-14 17:42:55 +0200 |
commit | 5341ce802e5283c1b4f2937687bd85c73b9f5c1b (patch) | |
tree | 421f702fe7553617a7f5667a76edab47ba7b7d71 /pkg | |
parent | 1322b41aa09d9cd9c4a51a7b69ff0e92df37a90b (diff) | |
parent | 2be01ea4fb2aa18d83c04a5acc607bb398546f4c (diff) | |
download | podman-5341ce802e5283c1b4f2937687bd85c73b9f5c1b.tar.gz podman-5341ce802e5283c1b4f2937687bd85c73b9f5c1b.tar.bz2 podman-5341ce802e5283c1b4f2937687bd85c73b9f5c1b.zip |
Merge pull request #3252 from mtrmac/registries.conf-mirrors
Update containers/image to v2.0.0, and buildah to v1.8.4
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/registries/registries.go | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/pkg/registries/registries.go b/pkg/registries/registries.go index 5c4ecd020..de63dcbf1 100644 --- a/pkg/registries/registries.go +++ b/pkg/registries/registries.go @@ -44,17 +44,7 @@ func getRegistries() ([]sysregistriesv2.Registry, error) { // GetRegistries obtains the list of search registries defined in the global registries file. func GetRegistries() ([]string, error) { - var searchRegistries []string - registries, err := getRegistries() - if err != nil { - return nil, err - } - for _, reg := range registries { - if reg.Search { - searchRegistries = append(searchRegistries, reg.Location) - } - } - return searchRegistries, nil + return sysregistriesv2.UnqualifiedSearchRegistries(&types.SystemContext{SystemRegistriesConfPath: SystemRegistriesConfPath()}) } // GetBlockedRegistries obtains the list of blocked registries defined in the global registries file. @@ -66,7 +56,7 @@ func GetBlockedRegistries() ([]string, error) { } for _, reg := range registries { if reg.Blocked { - blockedRegistries = append(blockedRegistries, reg.Location) + blockedRegistries = append(blockedRegistries, reg.Prefix) } } return blockedRegistries, nil @@ -81,7 +71,7 @@ func GetInsecureRegistries() ([]string, error) { } for _, reg := range registries { if reg.Insecure { - insecureRegistries = append(insecureRegistries, reg.Location) + insecureRegistries = append(insecureRegistries, reg.Prefix) } } return insecureRegistries, nil |