mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
add init flag to all containers
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
1b1626fe56
commit
4c0e30d49d
9 changed files with 39 additions and 0 deletions
|
|
@ -32,6 +32,7 @@ class Container {
|
|||
private array $nextcloudExecCommands;
|
||||
private bool $readOnlyRootFs;
|
||||
private array $tmpfs;
|
||||
private bool $init;
|
||||
private DockerActionManager $dockerActionManager;
|
||||
|
||||
public function __construct(
|
||||
|
|
@ -54,6 +55,7 @@ class Container {
|
|||
array $nextcloudExecCommands,
|
||||
bool $readOnlyRootFs,
|
||||
array $tmpfs,
|
||||
bool $init,
|
||||
DockerActionManager $dockerActionManager
|
||||
) {
|
||||
$this->identifier = $identifier;
|
||||
|
|
@ -75,6 +77,7 @@ class Container {
|
|||
$this->nextcloudExecCommands = $nextcloudExecCommands;
|
||||
$this->readOnlyRootFs = $readOnlyRootFs;
|
||||
$this->tmpfs = $tmpfs;
|
||||
$this->init = $init;
|
||||
$this->dockerActionManager = $dockerActionManager;
|
||||
}
|
||||
|
||||
|
|
@ -98,6 +101,10 @@ class Container {
|
|||
return $this->readOnlyRootFs;
|
||||
}
|
||||
|
||||
public function GetInit() : bool {
|
||||
return $this->init;
|
||||
}
|
||||
|
||||
public function GetShmSize() : int {
|
||||
return $this->shmSize;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -272,6 +272,11 @@ class ContainerDefinitionFetcher
|
|||
$tmpfs = $entry['tmpfs'];
|
||||
}
|
||||
|
||||
$init = true;
|
||||
if (isset($entry['init'])) {
|
||||
$init = $entry['init'];
|
||||
}
|
||||
|
||||
$containers[] = new Container(
|
||||
$entry['container_name'],
|
||||
$displayName,
|
||||
|
|
@ -292,6 +297,7 @@ class ContainerDefinitionFetcher
|
|||
$nextcloudExecCommands,
|
||||
$readOnlyRootFs,
|
||||
$tmpfs,
|
||||
$init,
|
||||
$this->container->get(DockerActionManager::class)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -450,6 +450,8 @@ class DockerActionManager
|
|||
$requestBody['HostConfig']['Tmpfs'] = $tmpfs;
|
||||
}
|
||||
|
||||
$requestBody['HostConfig']['Init'] = $container->GetInit();
|
||||
|
||||
$capAdds = $container->GetCapAdds();
|
||||
if (count($capAdds) > 0) {
|
||||
$requestBody['HostConfig']['CapAdd'] = $capAdds;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue