Skip to content
Snippets Groups Projects
Commit fcb8c1ae authored by jurgenhaas's avatar jurgenhaas
Browse files

Fix container inspection

parent 5ca0f4e0
Branches
Tags
No related merge requests found
......@@ -456,7 +456,12 @@ class Handler extends BaseHandler {
*/
private function readContainerConfig(): array {
try {
$id = getenv('COMPOSE_PROJECT_NAME') . '_l3d';
$output = [];
exec('basename "$(cat /proc/1/cpuset)"', $output);
$id = reset($output);
if ($id === '/') {
$id = getenv('COMPOSE_PROJECT_NAME') . '_l3d';
}
$output = [];
exec('docker container inspect ' . $id, $output);
return json_decode(implode('', $output), TRUE)[0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment