Add a {#DOCKER_CONTAINER_STATUS} LLD macro

This commit is contained in:
Daniel Berteaud 2022-01-20 17:28:37 +01:00
parent 607204a150
commit 51fa9f602a
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,8 @@ if ($what =~ m/^containers?/){
$format = '{' .
'"{#DOCKER_CONTAINER_ID}":"{{ .ID }}",' .
'"{#DOCKER_CONTAINER_IMAGE}": "{{ .Image }}",' .
'"{#DOCKER_CONTAINER_NAME}":"{{ .Names }}"' .
'"{#DOCKER_CONTAINER_NAME}":"{{ .Names }}",' .
'"{#DOCKER_CONTAINER_STATUS}":"{{ .Status }}"' .
'}';
$cmd = "$docker container list --all --format '$format'";
} elsif ($what =~ m/^networks?/){