mirror of
https://github.com/rancher/os.git
synced 2025-09-23 11:30:49 +00:00
Fix rename container in docker client
This commit is contained in:
13
Godeps/_workspace/src/github.com/fsouza/go-dockerclient/container.go
generated
vendored
13
Godeps/_workspace/src/github.com/fsouza/go-dockerclient/container.go
generated
vendored
@@ -226,15 +226,12 @@ type Container struct {
|
||||
}
|
||||
|
||||
// See for more details.
|
||||
func (c *Client) RenameContainer(id string, name string) error {
|
||||
qs := struct {
|
||||
new_name string
|
||||
func (c *Client) RenameContainer(id string, newName string) error {
|
||||
_, _, err := c.do("POST", fmt.Sprintf("/containers/"+id+"/rename?%s", queryString(struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
}{
|
||||
new_name: name,
|
||||
}
|
||||
|
||||
_, _, err := c.do("POST", fmt.Sprintf("/containers/"+id+"/rename?%s",
|
||||
queryString(qs)), nil)
|
||||
Name: newName,
|
||||
})), nil)
|
||||
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user