Commit 33a9c256 authored by Samuel Gaist's avatar Samuel Gaist

[dock] Gracefully handle client creation error

Fixes #107
Fixes beat.editor#282
parent 7ab0f93a
Pipeline #49653 passed with stage
in 57 minutes and 43 seconds
......@@ -421,8 +421,14 @@ class Host(object):
return environments
client = docker.from_env()
try:
client = docker.from_env()
except Exception as e:
if self.raise_on_errors:
raise
else:
logger.error("Docker client creation failed {}".format(e))
return {}, {}
try:
databases = client.images.list(
filters={"label": ["beat.env.type=database"]}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment