fix: stop reporting a missing image as a network problem

A 404 from the registry means the image name is wrong or the registry
needs authentication, but the pull wrapped every error with "please
check your Internet connection". Say what actually failed and keep the
network advice for the other errors.
This commit is contained in:
YueGuobin committed 2026-11-06 15:23:34 +08:00
1 parent 8c98142d26
commit d5d25eba06
2 files changed
+27 -2

No files matched your search

+9 -2
View File
@@ -396,10 +396,17 @@ class Docker(BaseManager):
params={"fromImage": image},
timeout=aiohttp.ClientTimeout(total=None, sock_read=PULL_IDLE_TIMEOUT),
)
except DockerHttp404Error as e:
raise DockerError(
f"Could not pull the '{image}' image: it was not found in the registry. "
f"Check the image name or run 'docker login' on the compute host "
f"(original error: {e})"
)
except DockerError as e:
raise DockerError(
f"Could not pull the '{image}' image from Docker repository, "
f"please check your Internet connection (original error: {e})"
f"Could not pull the '{image}' image from Docker repository. "
f"Check the image name, the registry authentication and your Internet connection "
f"(original error: {e})"
)
# The pull api will stream status via an HTTP JSON stream
content = ""