do not pull containers START_CONTAINERS was provided and not AUTOMATIC_UPDATES

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-08-26 22:52:19 +02:00
parent 34d5ee6298
commit c872c259c1

View file

@ -30,20 +30,19 @@ class DockerController
$container = $this->containerDefinitionFetcher->GetContainerById($id);
foreach($container->GetDependsOn() as $dependency) {
$this->PerformRecursiveContainerStart($dependency);
$this->PerformRecursiveContainerStart($dependency, $pullContainer);
}
if ($id === 'nextcloud-aio-database') {
if ($this->dockerActionManager->GetDatabasecontainerExitCode() > 0) {
$pullContainer = false;
error_log('Not pulling the latest database image because the container was not correctly shut down.');
}
}
$this->dockerActionManager->DeleteContainer($container);
$this->dockerActionManager->CreateVolumes($container);
if ($pullContainer) {
$this->dockerActionManager->PullContainer($container);
} else {
error_log('Not pulling the latest database image because the container was not correctly shut down.');
}
$this->dockerActionManager->CreateContainer($container);
$this->dockerActionManager->StartContainer($container);