Refactor ResolveAuthConfig to remove the builder dependency on cli code.

registry.ResolveAuthConfig() only needs the AuthConfigs from the ConfigFile, so
this change passed just the AuthConfigs.

Signed-off-by: Daniel Nephin <dnephin@gmail.com>
Upstream-commit: 920ea13516c24d00931cac42b608b5827986ede7
Component: engine
This commit is contained in:
Daniel Nephin
2015-12-11 19:11:20 -08:00
parent 579142820b
commit 5ff0f9ef5e
8 changed files with 25 additions and 52 deletions

View File

@ -44,7 +44,7 @@ func (cli *DockerCli) CmdPush(args ...string) error {
return err
}
// Resolve the Auth config relevant for this server
authConfig := registry.ResolveAuthConfig(cli.configFile, repoInfo.Index)
authConfig := registry.ResolveAuthConfig(cli.configFile.AuthConfigs, repoInfo.Index)
// If we're not using a custom registry, we know the restrictions
// applied to repository names and can warn the user in advance.
// Custom repositories can have different rules, and we must also