提交 3ac7b5ab 编写于 作者: A alesapin

Fetch helper image before run

上级 66b7748b
......@@ -166,6 +166,17 @@ class _NetworkManager:
except docker.errors.NotFound:
pass
# for some reason docker api may hang if image doesn't exist, so we download it
# before running
for i in range(5):
try:
subprocess.check_call("docker pull yandex/clickhouse-integration-helper", shell=True)
break
except:
time.sleep(i)
else:
raise Exception("Cannot pull yandex/clickhouse-integration-helper image")
self._container = self._docker_client.containers.run('yandex/clickhouse-integration-helper',
auto_remove=True,
command=('sleep %s' % self.container_exit_timeout),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册