From 7b5a0964b20fe353c9ed5761a2e9c9216190b93f Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 22 Oct 2020 12:49:48 +0200 Subject: [PATCH] outposts: handle docker connection error on init --- passbook/outposts/controllers/docker.py | 5 ++++- passbook/outposts/templates/outposts/deployment_modal.html | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/passbook/outposts/controllers/docker.py b/passbook/outposts/controllers/docker.py index 46b1ff4ea..df4e8f514 100644 --- a/passbook/outposts/controllers/docker.py +++ b/passbook/outposts/controllers/docker.py @@ -24,7 +24,10 @@ class DockerController(BaseController): def __init__(self, outpost: Outpost) -> None: super().__init__(outpost) - self.client = from_env() + try: + self.client = from_env() + except DockerException as exc: + raise ControllerException from exc def _get_labels(self) -> Dict[str, str]: return {} diff --git a/passbook/outposts/templates/outposts/deployment_modal.html b/passbook/outposts/templates/outposts/deployment_modal.html index d84b7bb16..f0c612c93 100644 --- a/passbook/outposts/templates/outposts/deployment_modal.html +++ b/passbook/outposts/templates/outposts/deployment_modal.html @@ -24,6 +24,7 @@ + {# TODO: Only load key on modal open #}

{% trans 'If your passbook Instance is using a self-signed certificate, set this value.' %}