Skip to content

Commit

Permalink
Merge pull request #3583 from nextcloud/enh/noid/improve-pullcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
szaimen authored Oct 30, 2023
2 parents a80ab8a + 6168ea3 commit a770fc8
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions php/src/Docker/DockerActionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -577,14 +577,8 @@ public function CreateContainer(Container $container) : void {
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
Expand Down

0 comments on commit a770fc8

Please sign in to comment.