Fix #16211 - only stop/kill running containers
This commit is contained in:
parent
964d9b3a6d
commit
b9b727f435
1 changed files with 2 additions and 1 deletions
|
@ -1616,7 +1616,8 @@ class ContainerManager(DockerBaseClass):
|
||||||
self.diff['image_different'] = True
|
self.diff['image_different'] = True
|
||||||
self.log("differences")
|
self.log("differences")
|
||||||
self.log(differences, pretty_print=True)
|
self.log(differences, pretty_print=True)
|
||||||
self.container_stop(container.Id)
|
if container.running:
|
||||||
|
self.container_stop(container.Id)
|
||||||
self.container_remove(container.Id)
|
self.container_remove(container.Id)
|
||||||
new_container = self.container_create(self.parameters.image, self.parameters.create_parameters)
|
new_container = self.container_create(self.parameters.image, self.parameters.create_parameters)
|
||||||
if new_container:
|
if new_container:
|
||||||
|
|
Loading…
Reference in a new issue