Remove timeout when waiting for container to finish. (#527)

This commit is contained in:
Felix Fontein
2022-12-08 22:15:42 +01:00
committed by GitHub
parent b318c02148
commit 3a40112a76
3 changed files with 5 additions and 3 deletions
@@ -281,7 +281,7 @@ class EngineDriver(object):
pass
@abc.abstractmethod
def wait_for_container(self, client, container_id):
def wait_for_container(self, client, container_id, timeout=None):
pass
@abc.abstractmethod
@@ -269,8 +269,8 @@ class DockerAPIEngineDriver(EngineDriver):
def start_container(self, client, container_id):
client.post_json('/containers/{0}/start', container_id)
def wait_for_container(self, client, container_id):
return client.post_json_to_json('/containers/{0}/wait', container_id)['StatusCode']
def wait_for_container(self, client, container_id, timeout=None):
return client.post_json_to_json('/containers/{0}/wait', container_id, timeout=timeout)['StatusCode']
def get_container_output(self, client, container_id):
config = client.get_json('/containers/{0}/json', container_id)