Merge pull request #45530 from rumpl/fix-empty-auth-pull
c8d: The authorizer needs to be set even if AuthConfig is empty
This commit is contained in:
commit
5d5f2e3a93
1 changed files with 1 additions and 4 deletions
|
@ -27,10 +27,7 @@ func (i *ImageService) newResolverFromAuthConfig(authConfig *registrytypes.AuthC
|
|||
func hostsWrapper(hostsFn docker.RegistryHosts, optAuthConfig *registrytypes.AuthConfig, regService RegistryConfigProvider) docker.RegistryHosts {
|
||||
var authorizer docker.Authorizer
|
||||
if optAuthConfig != nil {
|
||||
auth := *optAuthConfig
|
||||
if auth != (registrytypes.AuthConfig{}) {
|
||||
authorizer = docker.NewDockerAuthorizer(authorizationCredsFromAuthConfig(auth))
|
||||
}
|
||||
authorizer = docker.NewDockerAuthorizer(authorizationCredsFromAuthConfig(*optAuthConfig))
|
||||
}
|
||||
|
||||
return func(n string) ([]docker.RegistryHost, error) {
|
||||
|
|
Loading…
Reference in a new issue