disable SELinux for AIO containers

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2024-01-12 16:22:22 +01:00
parent f0e206b60d
commit 27d4f793e5

View file

@ -522,6 +522,9 @@ class DockerActionManager
$requestBody['HostConfig']['SecurityOpt'] = ["apparmor:unconfined"];
}
// Disable SELinux for AIO containers so that it does not break them
$requestBody['HostConfig']['SecurityOpt'] = ["label:disable"];
$mounts = [];
// Special things for the backup container which should not be exposed in the containers.json
@ -553,9 +556,6 @@ class DockerActionManager
}
$mounts[] = ["Type" => "bind", "Source" => $volume->name, "Target" => $volume->mountPoint, "ReadOnly" => !$volume->isWritable, "BindOptions" => [ "Propagation" => "rshared"]];
}
// Special things for the watchtower and docker-socket-proxy container which should not be exposed in the containers.json
} elseif ($container->GetIdentifier() === 'nextcloud-aio-watchtower' || $container->GetIdentifier() === 'nextcloud-aio-docker-socket-proxy') {
$requestBody['HostConfig']['SecurityOpt'] = ["label:disable"];
}
if (count($mounts) > 0) {