mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
DockerActionManager: fix getting the tag from the image
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
476d80ca54
commit
3ede76af8f
1 changed files with 4 additions and 7 deletions
|
|
@ -736,16 +736,13 @@ readonly class DockerActionManager {
|
||||||
$output = json_decode($this->guzzleClient->get($url)->getBody()->getContents(), true);
|
$output = json_decode($this->guzzleClient->get($url)->getBody()->getContents(), true);
|
||||||
$containerChecksum = $output['Image'];
|
$containerChecksum = $output['Image'];
|
||||||
$tagArray = explode(':', $output['Config']['Image']);
|
$tagArray = explode(':', $output['Config']['Image']);
|
||||||
$tag = $tagArray[1];
|
if (isset($tagArray[1])) {
|
||||||
apcu_add($cacheKey, $tag);
|
$tag = $tagArray[1];
|
||||||
/**
|
} else {
|
||||||
* @psalm-suppress TypeDoesNotContainNull
|
|
||||||
* @psalm-suppress DocblockTypeContradiction
|
|
||||||
*/
|
|
||||||
if ($tag === null) {
|
|
||||||
error_log("No tag was found when getting the current channel. You probably did not follow the documentation correctly. Changing the channel to the default 'latest'.");
|
error_log("No tag was found when getting the current channel. You probably did not follow the documentation correctly. Changing the channel to the default 'latest'.");
|
||||||
$tag = 'latest';
|
$tag = 'latest';
|
||||||
}
|
}
|
||||||
|
apcu_add($cacheKey, $tag);
|
||||||
return $tag;
|
return $tag;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
error_log('Could not get current channel ' . $e->getMessage());
|
error_log('Could not get current channel ' . $e->getMessage());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue