mirror of
https://github.com/GNS3/gns3-server
synced 2025-04-19 17:19:00 +00:00
Replace "Docker hub" by "Docker repository" because it is possible to use different repositories
This commit is contained in:
parent
f00f21c4bd
commit
0e89ff56a8
@ -261,21 +261,21 @@ class Docker(BaseManager):
|
||||
pass
|
||||
|
||||
if progress_callback:
|
||||
progress_callback("Pulling '{}' from docker hub".format(image))
|
||||
progress_callback("Pulling '{}' from Docker repository".format(image))
|
||||
try:
|
||||
response = await 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))
|
||||
raise DockerError("Could not pull the '{}' image from Docker repository, please check your Internet connection (original error: {})".format(image, e))
|
||||
# The pull api will stream status via an HTTP JSON stream
|
||||
content = ""
|
||||
while True:
|
||||
try:
|
||||
chunk = await response.content.read(CHUNK_SIZE)
|
||||
except aiohttp.ServerDisconnectedError:
|
||||
log.error("Disconnected from server while pulling Docker image '{}' from docker hub".format(image))
|
||||
log.error("Disconnected from server while pulling Docker image '{}' from Docker repository".format(image))
|
||||
break
|
||||
except asyncio.TimeoutError:
|
||||
log.error("Timeout while pulling Docker image '{}' from docker hub".format(image))
|
||||
log.error("Timeout while pulling Docker image '{}' from Docker repository".format(image))
|
||||
break
|
||||
if not chunk:
|
||||
break
|
||||
|
@ -365,7 +365,7 @@ class DockerVM(BaseNode):
|
||||
try:
|
||||
image_infos = await self._get_image_information()
|
||||
except DockerHttp404Error:
|
||||
log.info("Image '{}' is missing, pulling it from Docker hub...".format(self._image))
|
||||
log.info("Image '{}' is missing, pulling it from Docker repository...".format(self._image))
|
||||
await self.pull_image(self._image)
|
||||
image_infos = await self._get_image_information()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user