fix set_memory for imaginary and move cap_add to containers.json

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-03-06 11:36:36 +01:00
parent c54395aa4c
commit 6587530242
5 changed files with 32 additions and 2 deletions

View file

@ -411,9 +411,13 @@ class DockerActionManager
$requestBody['HostConfig']['Devices'] = $devices;
}
$capAdds = $container->GetCapAdds();
if (count($capAdds) > 0) {
$requestBody['HostConfig']['CapAdd'] = $capAdds;
}
// Special things for the backup container which should not be exposed in the containers.json
if ($container->GetIdentifier() === 'nextcloud-aio-borgbackup') {
$requestBody['HostConfig']['CapAdd'] = ["SYS_ADMIN"];
$requestBody['HostConfig']['SecurityOpt'] = ["apparmor:unconfined"];
// Additional backup directories