mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 09:18:08 +00:00
Add explicit error when trying to pull a Docker image from Docker Hub without Internet access. Fixes #1506.
This commit is contained in:
parent
0b07299472
commit
d9a9abf845
@ -200,7 +200,10 @@ class Docker(BaseManager):
|
|||||||
|
|
||||||
if progress_callback:
|
if progress_callback:
|
||||||
progress_callback("Pulling '{}' from docker hub".format(image))
|
progress_callback("Pulling '{}' from docker hub".format(image))
|
||||||
response = yield from self.http_query("POST", "images/create", params={"fromImage": image}, timeout=None)
|
try:
|
||||||
|
response = yield from self.http_query("POST", "images/create", params={"fromImage": image}, timeout=None)
|
||||||
|
except DockerError as e:
|
||||||
|
raise DockerError("Could not pull the '{}' image from Docker Hub, please check your Internet connection (original error: {})".format(image, e))
|
||||||
# The pull api will stream status via an HTTP JSON stream
|
# The pull api will stream status via an HTTP JSON stream
|
||||||
content = ""
|
content = ""
|
||||||
while True:
|
while True:
|
||||||
|
Loading…
Reference in New Issue
Block a user