From edfad5b78689be0d5490945db3eb49307d0878bd Mon Sep 17 00:00:00 2001 From: Fabrizio Steiner Date: Sat, 7 Jan 2017 00:46:13 +0100 Subject: [PATCH] RenameContainer implemented, this fixes the problem that watchtower can't update itself. --- container/client.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/container/client.go b/container/client.go index cf2e589..62dbd36 100644 --- a/container/client.go +++ b/container/client.go @@ -132,10 +132,9 @@ func (client dockerClient) StartContainer(c Container) error { } func (client dockerClient) RenameContainer(c Container, newName string) error { + bg := context.Background() log.Debugf("Renaming container %s (%s) to %s", c.Name(), c.ID(), newName) - //return client.api.ContainerRename(c.ID(), newName) - // no op - return nil + return client.api.ContainerRename(bg, c.ID(), newName) } func (client dockerClient) IsContainerStale(c Container) (bool, error) {