mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-17 14:58:13 +00:00
Replace "Docker hub" by "Docker repository" because it is possible to use different repositories
Some checks failed
testing / build (ubuntu-latest, 3.10) (push) Has been cancelled
testing / build (ubuntu-latest, 3.11) (push) Has been cancelled
testing / build (ubuntu-latest, 3.12) (push) Has been cancelled
testing / build (ubuntu-latest, 3.13) (push) Has been cancelled
testing / build (ubuntu-latest, 3.8) (push) Has been cancelled
testing / build (ubuntu-latest, 3.9) (push) Has been cancelled
Some checks failed
testing / build (ubuntu-latest, 3.10) (push) Has been cancelled
testing / build (ubuntu-latest, 3.11) (push) Has been cancelled
testing / build (ubuntu-latest, 3.12) (push) Has been cancelled
testing / build (ubuntu-latest, 3.13) (push) Has been cancelled
testing / build (ubuntu-latest, 3.8) (push) Has been cancelled
testing / build (ubuntu-latest, 3.9) (push) Has been cancelled
This commit is contained in:
@ -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()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user