summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--entrypoint.sh3
-rw-r--r--public/index.php5
2 files changed, 7 insertions, 1 deletions
diff --git a/entrypoint.sh b/entrypoint.sh
index 7914676..b80944e 100644
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -1,5 +1,8 @@
#!/bin/sh
+mkdir -p /opt/application/_runners
+chmod -R 0777 /opt/application/_runners
+
cd /usr/local/bin/
./dockerd-entrypoint.sh &
./httpd-foreground &
diff --git a/public/index.php b/public/index.php
index b6ac78e..ac41acc 100644
--- a/public/index.php
+++ b/public/index.php
@@ -116,7 +116,10 @@ if (isset($_POST["code"]) && strlen($_POST["code"]) <= 16383) {
"csrf" => $csrf,
];
- delTree($runnerDir);
+ if ($isInDocker)
+ exec("su-exec root rm -rf '$runnerDir'");
+ else
+ delTree($runnerDir);
echo json_encode($result);
exit;