outposts: only kill docker container if its running

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-28 18:32:16 +02:00
parent 5769eb277c
commit 9b70aaa717
1 changed files with 2 additions and 1 deletions

View File

@ -134,7 +134,8 @@ class DockerController(BaseController):
def down(self):
try:
container, _ = self._get_container()
container.kill()
if container.status == "running":
container.kill()
container.remove()
except DockerException as exc:
raise ControllerException from exc