Merge pull request #3583 from nextcloud/enh/noid/improve-pullcontainer

This commit is contained in:
Simon L 2023-10-30 08:47:45 +01:00 committed by GitHub
commit a770fc879d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -577,14 +577,8 @@ class DockerActionManager
public function PullContainer(Container $container) : void
{
$url = $this->BuildApiUrl(sprintf('images/create?fromImage=%s', urlencode($this->BuildImageName($container))));
try {
$this->guzzleClient->post($url);
} catch (RequestException $e) {
error_log('Could not get image ' . $this->BuildImageName($container) . ' from docker hub. Probably due to rate limits. ' . $e->getMessage());
// Don't exit here because it is possible that the image is already present
// and we ran into docker hub limits.
// We will exit later if not image should be available.
}
// do not catch any exception so that it always throws and logs the error
$this->guzzleClient->post($url);
}
private function isContainerUpdateAvailable(string $id) : string