mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Fetch helper image before run
This commit is contained in:
parent
66b7748b63
commit
3ac7b5aba8
@ -166,6 +166,17 @@ class _NetworkManager:
|
|||||||
except docker.errors.NotFound:
|
except docker.errors.NotFound:
|
||||||
pass
|
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',
|
self._container = self._docker_client.containers.run('yandex/clickhouse-integration-helper',
|
||||||
auto_remove=True,
|
auto_remove=True,
|
||||||
command=('sleep %s' % self.container_exit_timeout),
|
command=('sleep %s' % self.container_exit_timeout),
|
||||||
|
Loading…
Reference in New Issue
Block a user