mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 22:46:55 +00:00
harden pulling images from docker hub issues
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
f0210e8594
commit
93dd64f5ee
2 changed files with 24 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue