From 3dcd67c1a3d1f9d325c54185daf88de185e230f4 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 28 Apr 2021 18:32:16 +0200 Subject: [PATCH] outposts: only kill docker container if its running Signed-off-by: Jens Langhammer --- authentik/outposts/controllers/docker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/authentik/outposts/controllers/docker.py b/authentik/outposts/controllers/docker.py index d87b99656..0d7ea5630 100644 --- a/authentik/outposts/controllers/docker.py +++ b/authentik/outposts/controllers/docker.py @@ -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