mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-02-25 06:14:38 +08:00
Merge pull request #2248 from nextcloud/enh/noid/shm-size-int
shm-size must be an int
This commit is contained in:
commit
291d543f37
3 changed files with 5 additions and 5 deletions
|
@ -25,7 +25,7 @@ class Container {
|
|||
private array $devices;
|
||||
/** @var string[] */
|
||||
private array $capAdd;
|
||||
private string $shmSize;
|
||||
private int $shmSize;
|
||||
private DockerActionManager $dockerActionManager;
|
||||
|
||||
public function __construct(
|
||||
|
@ -42,7 +42,7 @@ class Container {
|
|||
array $secrets,
|
||||
array $devices,
|
||||
array $capAdd,
|
||||
string $shmSize,
|
||||
int $shmSize,
|
||||
DockerActionManager $dockerActionManager
|
||||
) {
|
||||
$this->identifier = $identifier;
|
||||
|
@ -78,7 +78,7 @@ class Container {
|
|||
return $this->restartPolicy;
|
||||
}
|
||||
|
||||
public function GetShmSize() : string {
|
||||
public function GetShmSize() : int {
|
||||
return $this->shmSize;
|
||||
}
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@ class ContainerDefinitionFetcher
|
|||
$capAdd = $entry['cap_add'];
|
||||
}
|
||||
|
||||
$shmSize = '';
|
||||
$shmSize = -1;
|
||||
if (isset($entry['shm_size'])) {
|
||||
$shmSize = $entry['shm_size'];
|
||||
}
|
||||
|
|
|
@ -406,7 +406,7 @@ class DockerActionManager
|
|||
}
|
||||
|
||||
$shmSize = $container->GetShmSize();
|
||||
if ($shmSize !== '') {
|
||||
if ($shmSize > 0) {
|
||||
$requestBody['HostConfig']['ShmSize'] = $shmSize;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue