Handle new pull failures behavior in Engine 1.13
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
d7e9748501
commit
efb4ed1b9e
2 changed files with 7 additions and 6 deletions
|
|
@ -10,6 +10,7 @@ from operator import attrgetter
|
|||
import enum
|
||||
import six
|
||||
from docker.errors import APIError
|
||||
from docker.errors import NotFound
|
||||
from docker.utils import LogConfig
|
||||
from docker.utils.ports import build_port_bindings
|
||||
from docker.utils.ports import split_port
|
||||
|
|
@ -829,12 +830,11 @@ class Service(object):
|
|||
repo, tag, separator = parse_repository_tag(self.options['image'])
|
||||
tag = tag or 'latest'
|
||||
log.info('Pulling %s (%s%s%s)...' % (self.name, repo, separator, tag))
|
||||
output = self.client.pull(repo, tag=tag, stream=True)
|
||||
|
||||
try:
|
||||
output = self.client.pull(repo, tag=tag, stream=True)
|
||||
return progress_stream.get_digest_from_pull(
|
||||
stream_output(output, sys.stdout))
|
||||
except StreamOutputError as e:
|
||||
except (StreamOutputError, NotFound) as e:
|
||||
if not ignore_pull_failures:
|
||||
raise
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue