This updates buildah for the sysregistriesv2 changes.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
Miloslav Trmač
2018-12-03 20:54:07 +01:00
parent 33fcb355ca
commit d3be6b8578
12 changed files with 298 additions and 15 deletions

View File

@ -122,12 +122,11 @@ func ResolveName(name string, firstRegistry string, sc *types.SystemContext, sto
// Figure out the list of registries.
var registries []string
allRegistries, err := sysregistriesv2.GetRegistries(sc)
searchRegistries, err := sysregistriesv2.FindUnqualifiedSearchRegistries(sc)
if err != nil {
logrus.Debugf("unable to read configured registries to complete %q: %v", name, err)
registries = []string{}
}
for _, registry := range sysregistriesv2.FindUnqualifiedSearchRegistries(allRegistries) {
for _, registry := range searchRegistries {
if !registry.Blocked {
registries = append(registries, registry.URL)
}