Pass authentication credentials through to build

In Docker 1.10 and earlier, "docker build" can do a build FROM a private
repository that hasn't yet been pulled. This doesn't work on master. I
bisected this to https://github.com/docker/docker/pull/19414.
AuthConfigs is deserialized from the HTTP request, but not included in
the builder options.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 6fed46aeb97943315aed12f2dc62565f7bcc53dc
Component: engine
This commit is contained in:
Aaron Lehmann
2016-02-12 09:08:45 -08:00
parent 100b7c7c54
commit 5d5044b24f
2 changed files with 25 additions and 0 deletions

View File

@ -159,6 +159,8 @@ func (br *buildRouter) postBuild(ctx context.Context, w http.ResponseWriter, r *
buildOptions.Dockerfile = dockerfileName
}
buildOptions.AuthConfigs = authConfigs
out = output
if buildOptions.SuppressOutput {
out = notVerboseBuffer