mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
shm-size must be an int
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
1cae0980cd
commit
8b6bb94539
3 changed files with 5 additions and 5 deletions
|
|
@ -25,7 +25,7 @@ class Container {
|
||||||
private array $devices;
|
private array $devices;
|
||||||
/** @var string[] */
|
/** @var string[] */
|
||||||
private array $capAdd;
|
private array $capAdd;
|
||||||
private string $shmSize;
|
private int $shmSize;
|
||||||
private DockerActionManager $dockerActionManager;
|
private DockerActionManager $dockerActionManager;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
|
|
@ -42,7 +42,7 @@ class Container {
|
||||||
array $secrets,
|
array $secrets,
|
||||||
array $devices,
|
array $devices,
|
||||||
array $capAdd,
|
array $capAdd,
|
||||||
string $shmSize,
|
int $shmSize,
|
||||||
DockerActionManager $dockerActionManager
|
DockerActionManager $dockerActionManager
|
||||||
) {
|
) {
|
||||||
$this->identifier = $identifier;
|
$this->identifier = $identifier;
|
||||||
|
|
@ -78,7 +78,7 @@ class Container {
|
||||||
return $this->restartPolicy;
|
return $this->restartPolicy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetShmSize() : string {
|
public function GetShmSize() : int {
|
||||||
return $this->shmSize;
|
return $this->shmSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ class ContainerDefinitionFetcher
|
||||||
$capAdd = $entry['cap_add'];
|
$capAdd = $entry['cap_add'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$shmSize = '';
|
$shmSize = -1;
|
||||||
if (isset($entry['shm_size'])) {
|
if (isset($entry['shm_size'])) {
|
||||||
$shmSize = $entry['shm_size'];
|
$shmSize = $entry['shm_size'];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -406,7 +406,7 @@ class DockerActionManager
|
||||||
}
|
}
|
||||||
|
|
||||||
$shmSize = $container->GetShmSize();
|
$shmSize = $container->GetShmSize();
|
||||||
if ($shmSize !== '') {
|
if ($shmSize > 0) {
|
||||||
$requestBody['HostConfig']['ShmSize'] = $shmSize;
|
$requestBody['HostConfig']['ShmSize'] = $shmSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue