fix: docker container status (#374)

This commit is contained in:
lollipopkit
2024-06-05 21:58:19 +08:00
parent 40ce37d230
commit 97267cdfbf
7 changed files with 43 additions and 34 deletions

View File

@@ -277,8 +277,8 @@ enum ContainerCmdType {
ContainerCmdType.version => '$prefix version $_jsonFmt',
ContainerCmdType.ps => switch (type) {
/// Use [_jsonFmt] in Docker will cause the operation to slow down.
ContainerType.docker => '$prefix ps -a --format "table '
'{{printf \\"${"%-30.30s " * 4}\\" .ID .Names .Image .Status}}"',
ContainerType.docker => '$prefix ps -a --format "table {{printf \\"'
'%-15.15s ${"%-30.30s " * 3}\\" .ID .Names .Image .Status}}"',
ContainerType.podman => '$prefix ps -a $_jsonFmt',
},
ContainerCmdType.stats =>