From 734c38ebb4e17e28670307d2fc2b52d647a1ec9c Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 21 Feb 2022 00:25:35 +0400 Subject: [PATCH] feat: fix runtime bugs --- app/executor.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/executor.php b/app/executor.php index e6e09216da..72fe2827ed 100644 --- a/app/executor.php +++ b/app/executor.php @@ -198,20 +198,26 @@ App::post('/v1/runtimes') ->setMemory(App::getEnv('_APP_FUNCTIONS_MEMORY', 256)) ->setSwap(App::getEnv('_APP_FUNCTIONS_MEMORY_SWAP', 256)); + $entrypoint = empty($commands) ? [] : [ + 'tail', + '-f', + '/dev/null' + ]; $containerId = $orchestration->run( image: $baseImage, name: $runtimeId, hostname: $runtimeId, vars: $vars, + command: $entrypoint, labels: [ 'openruntimes-id' => $runtimeId, 'openruntimes-type' => 'runtime', 'openruntimes-created' => strval($startTime), 'openruntimes-runtime' => $runtime, ], - mountFolder: \dirname($tmpSource), workdir: $workdir, volumes: [ + \dirname($tmpSource). ':/tmp:rw', \dirname($tmpBuild). ":/usr/code:rw" ] ); @@ -285,7 +291,6 @@ App::post('/v1/runtimes') 'key' => $secret, ]); } - Console::success('Build Stage completed in ' . ($endTime - $startTime) . ' seconds');