From 3d868d4457a3223f297fe769f8eb186875ccbe14 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 28 Jul 2023 17:08:44 +0200 Subject: [PATCH] add executable bit on tmpfs for nextcloud container Signed-off-by: Simon L --- php/containers-schema.json | 2 +- php/containers.json | 2 +- php/src/Docker/DockerActionManager.php | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/php/containers-schema.json b/php/containers-schema.json index a5869ec99ce..91d32dc4dde 100644 --- a/php/containers-schema.json +++ b/php/containers-schema.json @@ -141,7 +141,7 @@ "type": "array", "items": { "type": "string", - "pattern": "^/[a-z/_0-9-]+$" + "pattern": "^/[a-z/_0-9-:]+$" } }, "volumes": { diff --git a/php/containers.json b/php/containers.json index 34a7b0d248e..1ca7fa86a69 100644 --- a/php/containers.json +++ b/php/containers.json @@ -211,7 +211,7 @@ "nextcloud-aio" ], "tmpfs": [ - "/tmp" + "/tmp:exec" ] }, { diff --git a/php/src/Docker/DockerActionManager.php b/php/src/Docker/DockerActionManager.php index 45727a37d7f..133b14c2eed 100644 --- a/php/src/Docker/DockerActionManager.php +++ b/php/src/Docker/DockerActionManager.php @@ -439,7 +439,11 @@ public function CreateContainer(Container $container) : void { $tmpfs = []; foreach($container->GetTmpfs() as $tmp) { - $tmpfs[$tmp] = ""; + $mode = ""; + if (str_contains($tmp, ':')) { + $mode = explode(':', $tmp)[1]; + } + $tmpfs[$tmp] = $mode; } if (count($tmpfs) > 0) { $requestBody['HostConfig']['Tmpfs'] = $tmpfs;