kopia lustrzana https://github.com/jupyterhub/repo2docker
catch ImageNotFound on initial pull
rodzic
28d6573fcb
commit
0e3da8f2f0
|
@ -100,16 +100,19 @@ class Builder(Application):
|
||||||
client = docker.APIClient(version='auto', **kwargs_from_env())
|
client = docker.APIClient(version='auto', **kwargs_from_env())
|
||||||
|
|
||||||
repo, tag = self.output_image_spec.split(':')
|
repo, tag = self.output_image_spec.split(':')
|
||||||
for line in client.pull(
|
try:
|
||||||
repository=repo,
|
for line in client.pull(
|
||||||
tag=tag,
|
repository=repo,
|
||||||
stream=True,
|
tag=tag,
|
||||||
):
|
stream=True,
|
||||||
progress = json.loads(line.decode('utf-8'))
|
):
|
||||||
if 'error' in progress:
|
progress = json.loads(line.decode('utf-8'))
|
||||||
break
|
if 'error' in progress:
|
||||||
else:
|
break
|
||||||
return
|
else:
|
||||||
|
return
|
||||||
|
except docker.errors.ImageNotFound:
|
||||||
|
pass
|
||||||
|
|
||||||
output_path = os.path.join(self.git_workdir, self.build_name)
|
output_path = os.path.join(self.git_workdir, self.build_name)
|
||||||
self.fetch(
|
self.fetch(
|
||||||
|
|
Ładowanie…
Reference in New Issue