From ded973219e997f52634eb18d0cfe828472412dd8 Mon Sep 17 00:00:00 2001 From: Marco Hennings Date: Fri, 30 Aug 2013 23:15:07 +0200 Subject: [PATCH] Move auth header on run cmd --- commands.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/commands.go b/commands.go index 24f6de13a6..b373267456 100644 --- a/commands.go +++ b/commands.go @@ -1457,9 +1457,13 @@ func (cli *DockerCli) CmdRun(args ...string) error { if err != nil { return err } - v.Set("authConfig", base64.URLEncoding.EncodeToString(buf)) - err = cli.stream("POST", "/images/create?"+v.Encode(), nil, cli.err, nil) + registryAuthHeader := []string{ + base64.URLEncoding.EncodeToString(buf), + } + err = cli.stream("POST", "/images/create?"+v.Encode(), nil, cli.err, map[string][]string{ + "X-Registry-Auth": registryAuthHeader, + }) if err != nil { return err }