diff --git a/util/resolver/resolver.go b/util/resolver/resolver.go index 0abe597e0843..a0276ddb775e 100644 --- a/util/resolver/resolver.go +++ b/util/resolver/resolver.go @@ -130,9 +130,10 @@ func NewRegistryConfig(m map[string]config.RegistryConfig) docker.RegistryHosts var out []docker.RegistryHost - for _, mirror := range c.Mirrors { - h := newMirrorRegistryHost(mirror) - hosts, err := fillInsecureOpts(mirror, m[mirror], h) + for _, rawMirror := range c.Mirrors { + h := newMirrorRegistryHost(rawMirror) + mirrorHost := h.Host + hosts, err := fillInsecureOpts(mirrorHost, m[mirrorHost], h) if err != nil { return nil, err }