Merge pull request #12009 from duglin/AddConfig

Migrate .dockercfg to .docker/config.json and support for HTTP Headers
This commit is contained in:
Alexander Morozov
2015-04-20 13:12:17 -07:00
19 changed files with 360 additions and 81 deletions
+2 -2
View File
@@ -101,8 +101,8 @@ type Builder struct {
// the final configs of the Dockerfile but dont want the layers
disableCommit bool
AuthConfig *registry.AuthConfig
AuthConfigFile *registry.ConfigFile
AuthConfig *registry.AuthConfig
ConfigFile *registry.ConfigFile
// Deprecated, original writer used for ImagePull. To be removed.
OutOld io.Writer
+2 -2
View File
@@ -437,13 +437,13 @@ func (b *Builder) pullImage(name string) (*imagepkg.Image, error) {
}
pullRegistryAuth := b.AuthConfig
if len(b.AuthConfigFile.Configs) > 0 {
if len(b.ConfigFile.AuthConfigs) > 0 {
// The request came with a full auth config file, we prefer to use that
repoInfo, err := b.Daemon.RegistryService.ResolveRepository(remote)
if err != nil {
return nil, err
}
resolvedAuth := b.AuthConfigFile.ResolveAuthConfig(repoInfo.Index)
resolvedAuth := b.ConfigFile.ResolveAuthConfig(repoInfo.Index)
pullRegistryAuth = &resolvedAuth
}
+1 -1
View File
@@ -150,7 +150,7 @@ func (b *BuilderJob) CmdBuild(job *engine.Job) error {
OutOld: job.Stdout,
StreamFormatter: sf,
AuthConfig: authConfig,
AuthConfigFile: configFile,
ConfigFile: configFile,
dockerfileName: dockerfileName,
cpuShares: cpuShares,
cpuSetCpus: cpuSetCpus,