mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-03 05:19:37 +00:00
save
This commit is contained in:
1 parent
77321172a2
commit
0f28acac00
28 files changed
+346
-228
No files matched your search
@@ -29,14 +29,17 @@ function format_docker_labels_to_json($rawOutput): Collection
|
||||
})[0];
|
||||
}
|
||||
|
||||
function get_container_status(Server $server, string $container_id, bool $throwError = false)
|
||||
function get_container_status(Server $server, string $container_id, bool $all_data = false, bool $throwError = false)
|
||||
{
|
||||
$container = instant_remote_process(["docker inspect --format '{{json .State}}' {$container_id}"], $server, $throwError);
|
||||
$container = instant_remote_process(["docker inspect --format '{{json .}}' {$container_id}"], $server, $throwError);
|
||||
if (!$container) {
|
||||
return 'exited';
|
||||
}
|
||||
$container = format_docker_command_output_to_json($container);
|
||||
return $container[0]['Status'];
|
||||
if ($all_data) {
|
||||
return $container[0];
|
||||
}
|
||||
return $container[0]['State']['Status'];
|
||||
}
|
||||
|
||||
function generate_container_name(string $uuid, int|null $pull_request_id = null)
|
||||
|
||||
Reference in new issue
Block a user