mirror of https://github.com/docker/docker-py.git
Merge b37a25d70b
into db7f8b8bb6
This commit is contained in:
commit
dabe958b3e
|
@ -932,8 +932,14 @@ class ContainerCollection(Collection):
|
|||
kwargs['image'] = image
|
||||
kwargs['command'] = command
|
||||
kwargs['version'] = self.client.api._version
|
||||
platform = kwargs.pop('platform', None)
|
||||
create_kwargs = _create_container_args(kwargs)
|
||||
resp = self.client.api.create_container(**create_kwargs)
|
||||
try:
|
||||
resp = self.client.api.create_container(**create_kwargs)
|
||||
except ImageNotFound:
|
||||
self.client.images.pull(image, platform=platform)
|
||||
resp = self.client.api.create_container(**create_kwargs)
|
||||
|
||||
return self.get(resp['Id'])
|
||||
|
||||
def get(self, container_id):
|
||||
|
|
Loading…
Reference in New Issue