From 6ebd257245a611246bb3ce9c6712c5eb19a9efb4 Mon Sep 17 00:00:00 2001 From: zhangguanzhang Date: Sat, 8 Aug 2020 18:35:21 +0800 Subject: Add the Status field in the ps --format=json Signed-off-by: zhangguanzhang --- cmd/podman/containers/ps.go | 1 + 1 file changed, 1 insertion(+) (limited to 'cmd/podman') diff --git a/cmd/podman/containers/ps.go b/cmd/podman/containers/ps.go index 64271031d..ebb6ed98f 100644 --- a/cmd/podman/containers/ps.go +++ b/cmd/podman/containers/ps.go @@ -109,6 +109,7 @@ func jsonOut(responses []entities.ListContainer) error { r := make([]entities.ListContainer, 0) for _, con := range responses { con.CreatedAt = units.HumanDuration(time.Since(time.Unix(con.Created, 0))) + " ago" + con.Status = psReporter{con}.Status() r = append(r, con) } b, err := json.MarshalIndent(r, "", " ") -- cgit v1.2.3-54-g00ecf