This reverts commit e9c3e397436221528312c0d3b291ae5a12862ed2.
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
| ... | ... |
@@ -881,6 +881,7 @@ func postBuild(eng *engine.Engine, version version.Version, w http.ResponseWrite |
| 881 | 881 |
// Both headers will be parsed and sent along to the daemon, but if a non-empty |
| 882 | 882 |
// ConfigFile is present, any value provided as an AuthConfig directly will |
| 883 | 883 |
// be overridden. See BuildFile::CmdFrom for details. |
| 884 |
+ // /* |
|
| 884 | 885 |
var ( |
| 885 | 886 |
authEncoded = r.Header.Get("X-Registry-Auth")
|
| 886 | 887 |
authConfig = ®istry.AuthConfig{}
|
| ... | ... |
@@ -895,6 +896,7 @@ func postBuild(eng *engine.Engine, version version.Version, w http.ResponseWrite |
| 895 | 895 |
configFile.Configs[authConfig.ServerAddress] = *authConfig |
| 896 | 896 |
} |
| 897 | 897 |
} |
| 898 |
+ // */ |
|
| 898 | 899 |
|
| 899 | 900 |
if configFileEncoded != "" {
|
| 900 | 901 |
configFileJson := base64.NewDecoder(base64.URLEncoding, strings.NewReader(configFileEncoded)) |
| ... | ... |
@@ -917,7 +919,7 @@ func postBuild(eng *engine.Engine, version version.Version, w http.ResponseWrite |
| 917 | 917 |
job.Setenv("q", r.FormValue("q"))
|
| 918 | 918 |
job.Setenv("nocache", r.FormValue("nocache"))
|
| 919 | 919 |
job.Setenv("rm", r.FormValue("rm"))
|
| 920 |
- job.SetenvJson("auth", configFile)
|
|
| 920 |
+ job.SetenvJson("configFile", configFile)
|
|
| 921 | 921 |
|
| 922 | 922 |
if err := job.Run(); err != nil {
|
| 923 | 923 |
if !job.Stdout.Used() {
|
| ... | ... |
@@ -83,7 +83,7 @@ func (b *buildFile) CmdFrom(name string) error {
|
| 83 | 83 |
job := b.srv.Eng.Job("pull", remote, tag)
|
| 84 | 84 |
job.SetenvBool("json", b.sf.Json())
|
| 85 | 85 |
job.SetenvBool("parallel", true)
|
| 86 |
- job.SetenvJson("auth", b.configFile)
|
|
| 86 |
+ job.SetenvJson("configFile", b.configFile)
|
|
| 87 | 87 |
job.Stdout.Add(b.outOld) |
| 88 | 88 |
if err := job.Run(); err != nil {
|
| 89 | 89 |
return err |
| ... | ... |
@@ -432,7 +432,7 @@ func (srv *Server) Build(job *engine.Job) engine.Status {
|
| 432 | 432 |
tag string |
| 433 | 433 |
context io.ReadCloser |
| 434 | 434 |
) |
| 435 |
- job.GetenvJson("auth", configFile)
|
|
| 435 |
+ job.GetenvJson("configFile", configFile)
|
|
| 436 | 436 |
repoName, tag = utils.ParseRepositoryTag(repoName) |
| 437 | 437 |
|
| 438 | 438 |
if remoteURL == "" {
|
| ... | ... |
@@ -1349,7 +1349,7 @@ func (srv *Server) ImagePull(job *engine.Job) engine.Status {
|
| 1349 | 1349 |
tag = job.Args[1] |
| 1350 | 1350 |
} |
| 1351 | 1351 |
|
| 1352 |
- job.GetenvJson("auth", configFile)
|
|
| 1352 |
+ job.GetenvJson("configFile", configFile)
|
|
| 1353 | 1353 |
job.GetenvJson("metaHeaders", metaHeaders)
|
| 1354 | 1354 |
|
| 1355 | 1355 |
endpoint, _, err := registry.ResolveRepositoryName(localName) |