mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-05 21:21:42 +00:00
Merge pull request #12009 from duglin/AddConfig
Migrate .dockercfg to .docker/config.json and support for HTTP Headers
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user