fix docker rm name issue

Addresses https://github.com/docker/docker/issues/12308

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
Qiang Huang 2015-05-01 22:26:40 +08:00
parent 79d086c47d
commit 79f13d1497
1 changed files with 2 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package client
import (
"fmt"
"net/url"
"strings"
flag "github.com/docker/docker/pkg/mflag"
)
@ -36,6 +37,7 @@ func (cli *DockerCli) CmdRm(args ...string) error {
if name == "" {
return fmt.Errorf("Container name cannot be empty")
}
name = strings.Trim(name, "/")
_, _, err := readBody(cli.call("DELETE", "/containers/"+name+"?"+val.Encode(), nil, nil))
if err != nil {