mirror of
https://github.com/GNS3/gns3-server
synced 2025-06-26 09:52:39 +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
|
pass
|
||||||
|
|
||||||
if progress_callback:
|
if progress_callback:
|
||||||
progress_callback("Pulling '{}' from docker hub".format(image))
|
progress_callback("Pulling '{}' from Docker repository".format(image))
|
||||||
try:
|
try:
|
||||||
response = await self.http_query("POST", "images/create", params={"fromImage": image}, timeout=None)
|
response = await self.http_query("POST", "images/create", params={"fromImage": image}, timeout=None)
|
||||||
except DockerError as e:
|
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
|
# The pull api will stream status via an HTTP JSON stream
|
||||||
content = ""
|
content = ""
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
chunk = await response.content.read(CHUNK_SIZE)
|
chunk = await response.content.read(CHUNK_SIZE)
|
||||||
except aiohttp.ServerDisconnectedError:
|
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
|
break
|
||||||
except asyncio.TimeoutError:
|
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
|
break
|
||||||
if not chunk:
|
if not chunk:
|
||||||
break
|
break
|
||||||
|
@ -365,7 +365,7 @@ class DockerVM(BaseNode):
|
|||||||
try:
|
try:
|
||||||
image_infos = await self._get_image_information()
|
image_infos = await self._get_image_information()
|
||||||
except DockerHttp404Error:
|
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)
|
await self.pull_image(self._image)
|
||||||
image_infos = await self._get_image_information()
|
image_infos = await self._get_image_information()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user