mirror of
https://github.com/rancher/os.git
synced 2025-09-05 08:42:38 +00:00
Updates for upstream docker client
This commit is contained in:
@@ -259,7 +259,7 @@ func (c *Container) renameCurrent(client *dockerClient.Client) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
err := client.RenameContainer(c.Container.ID, c.Name)
|
err := client.RenameContainer(dockerClient.RenameContainerOptions{ID: c.Container.ID, Name: c.Name})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -274,7 +274,7 @@ func (c *Container) renameOld(client *dockerClient.Client, opts *dockerClient.Cr
|
|||||||
}
|
}
|
||||||
|
|
||||||
existing, err := inspect(client, opts.Name)
|
existing, err := inspect(client, opts.Name)
|
||||||
if _, ok := err.(dockerClient.NoSuchContainer); ok {
|
if _, ok := err.(*dockerClient.NoSuchContainer); ok {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -306,7 +306,7 @@ func (c *Container) renameOld(client *dockerClient.Client, opts *dockerClient.Cr
|
|||||||
}
|
}
|
||||||
|
|
||||||
log.Debugf("Renaming %s to %s", existing.Name, newName)
|
log.Debugf("Renaming %s to %s", existing.Name, newName)
|
||||||
return client.RenameContainer(existing.ID, newName)
|
return client.RenameContainer(dockerClient.RenameContainerOptions{ID: existing.ID, Name: newName})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Container) getCreateOpts(client *dockerClient.Client) (*dockerClient.CreateContainerOptions, error) {
|
func (c *Container) getCreateOpts(client *dockerClient.Client) (*dockerClient.CreateContainerOptions, error) {
|
||||||
|
Reference in New Issue
Block a user