harden pulling images from docker hub issues

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2024-02-20 15:20:43 +01:00
parent f0210e8594
commit 93dd64f5ee
2 changed files with 24 additions and 0 deletions

View file

@ -587,6 +587,21 @@ class DockerActionManager
}
public function isDockerHubReachable(Container $container) : bool {
$tag = $container->GetImageTag();
if ($tag === '%AIO_CHANNEL%') {
$tag = $this->GetCurrentChannel();
}
$remoteDigest = $this->dockerHubManager->GetLatestDigestOfTag($container->GetContainerName(), $tag);
if ($remoteDigest === null) {
return false;
} else {
return true;
}
}
public function PullImage(Container $container) : void
{
$imageName = $this->BuildImageName($container);