mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #1889 from dsissitka/fixhttpimport
Fixed HTTP imports.
This commit is contained in:
commit
a81393787f
1 changed files with 6 additions and 4 deletions
10
commands.go
10
commands.go
|
@ -795,11 +795,13 @@ func (cli *DockerCli) CmdImport(args ...string) error {
|
||||||
v.Set("tag", tag)
|
v.Set("tag", tag)
|
||||||
v.Set("fromSrc", src)
|
v.Set("fromSrc", src)
|
||||||
|
|
||||||
err := cli.stream("POST", "/images/create?"+v.Encode(), cli.in, cli.out, nil)
|
var in io.Reader
|
||||||
if err != nil {
|
|
||||||
return err
|
if src == "-" {
|
||||||
|
in = cli.in
|
||||||
}
|
}
|
||||||
return nil
|
|
||||||
|
return cli.stream("POST", "/images/create?"+v.Encode(), in, cli.out, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cli *DockerCli) CmdPush(args ...string) error {
|
func (cli *DockerCli) CmdPush(args ...string) error {
|
||||||
|
|
Loading…
Reference in a new issue