From 98d26fa16faeb3fb443f767b4277b46ebb594cf3 Mon Sep 17 00:00:00 2001 From: Dramelac Date: Sun, 25 Feb 2024 17:44:01 +0100 Subject: [PATCH] Handle docker critical error on start --- exegol/model/ExegolContainer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/exegol/model/ExegolContainer.py b/exegol/model/ExegolContainer.py index 57ac0eaa..333685d4 100644 --- a/exegol/model/ExegolContainer.py +++ b/exegol/model/ExegolContainer.py @@ -116,7 +116,11 @@ def __start_container(self): """ with console.status(f"Waiting to start {self.name}", spinner_style="blue") as progress: start_date = datetime.utcnow() - self.__container.start() + try: + self.__container.start() + except APIError as e: + logger.debug(e) + logger.critical(f"Docker raise a critical error when starting the container [green]{self.name}[/green], error message is: {e.explanation}") if not self.config.legacy_entrypoint: # TODO improve startup compatibility check try: # Try to find log / startup messages. Will time out after 2 seconds if the image don't support status update through container logs.