Make default tls host work

Signed-off-by: Lei Jitang <leijitang@huawei.com>
This commit is contained in:
Lei Jitang
2015-10-22 15:07:07 -04:00
committed by Tibor Vass
parent 42abfab3a7
commit f4dc974b2a
8 changed files with 152 additions and 63 deletions
+6 -1
View File
@@ -112,8 +112,13 @@ func NewDockerCli(in io.ReadCloser, out, err io.Writer, clientFlags *cli.ClientF
return errors.New("Please specify only one -H")
}
defaultHost := opts.DefaultTCPHost
if clientFlags.Common.TLSOptions != nil {
defaultHost = opts.DefaultTLSHost
}
var e error
if hosts[0], e = opts.ParseHost(hosts[0]); e != nil {
if hosts[0], e = opts.ParseHost(defaultHost, hosts[0]); e != nil {
return e
}