Merge pull request #12921 from hqhq/hq_fix_rmlink
fix docker rm name issue
This commit is contained in:
commit
e1df16b3a3
1 changed files with 2 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue