mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
DockerActionManager: improve the logging
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
2992198d9b
commit
c578a6e3f3
2 changed files with 5 additions and 5 deletions
|
|
@ -46,7 +46,7 @@ readonly class DockerController {
|
||||||
if ($pullImage) {
|
if ($pullImage) {
|
||||||
if (!$this->dockerActionManager->isDockerHubReachable($container)) {
|
if (!$this->dockerActionManager->isDockerHubReachable($container)) {
|
||||||
$pullImage = false;
|
$pullImage = false;
|
||||||
error_log('Not pulling the image for the ' . $container->GetContainerName() . ' container because docker hub does not seem to be reachable.');
|
error_log('Not pulling the ' . $container->GetContainerName() . ' image for the ' . $container->GetIdentifier() . ' container because docker hub does not seem to be reachable.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ readonly class DockerActionManager {
|
||||||
try {
|
try {
|
||||||
$this->guzzleClient->post($url);
|
$this->guzzleClient->post($url);
|
||||||
} catch (RequestException $e) {
|
} catch (RequestException $e) {
|
||||||
throw new \Exception("Could not start container " . $container->GetIdentifier() . ": " . $e->getMessage());
|
throw new \Exception("Could not start container " . $container->GetIdentifier() . ": " . $e->getResponse()?->getBody()->getContents());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -588,7 +588,7 @@ readonly class DockerActionManager {
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} catch (RequestException $e) {
|
} catch (RequestException $e) {
|
||||||
throw new \Exception("Could not create container " . $container->GetIdentifier() . ": " . $e->getMessage());
|
throw new \Exception("Could not create container " . $container->GetIdentifier() . ": " . $e->getResponse()?->getBody()->getContents());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -623,7 +623,7 @@ readonly class DockerActionManager {
|
||||||
try {
|
try {
|
||||||
$this->guzzleClient->post($url);
|
$this->guzzleClient->post($url);
|
||||||
} catch (RequestException $e) {
|
} catch (RequestException $e) {
|
||||||
$message = "Could not pull image " . $imageName . ". Please run 'sudo docker exec -it nextcloud-aio-mastercontainer docker pull " . $imageName . "' in order to find out why it failed.";
|
$message = "Could not pull image " . $imageName . ": " . $e->getResponse()?->getBody()->getContents();
|
||||||
if ($imageIsThere === false) {
|
if ($imageIsThere === false) {
|
||||||
throw new \Exception($message);
|
throw new \Exception($message);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -883,7 +883,7 @@ readonly class DockerActionManager {
|
||||||
} catch (RequestException $e) {
|
} catch (RequestException $e) {
|
||||||
// 409 is undocumented and gets thrown if the network already exists.
|
// 409 is undocumented and gets thrown if the network already exists.
|
||||||
if ($e->getCode() !== 409) {
|
if ($e->getCode() !== 409) {
|
||||||
throw new \Exception("Could not create the nextcloud-aio network: " . $e->getMessage());
|
throw new \Exception("Could not create the nextcloud-aio network: " . $e->getResponse()?->getBody()->getContents());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue