diff options
author | Ashley Cui <acui@redhat.com> | 2020-07-30 13:50:50 -0400 |
---|---|---|
committer | Ashley Cui <acui@redhat.com> | 2020-07-30 15:33:22 -0400 |
commit | 8e6a6197db6496b9ef98399be49dfda8fb14811a (patch) | |
tree | 8c4d6830c15293eb015511394c27cd44828bd6ed /cmd | |
parent | 4132b71478c486b3f4eff6a344ee1b2defbab86f (diff) | |
download | podman-8e6a6197db6496b9ef98399be49dfda8fb14811a.tar.gz podman-8e6a6197db6496b9ef98399be49dfda8fb14811a.tar.bz2 podman-8e6a6197db6496b9ef98399be49dfda8fb14811a.zip |
add {{.RunningFor}} placeholder in ps --format
For docker compatibility
Signed-off-by: Ashley Cui <acui@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/containers/ps.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/containers/ps.go b/cmd/podman/containers/ps.go index 34fa4fab5..64271031d 100644 --- a/cmd/podman/containers/ps.go +++ b/cmd/podman/containers/ps.go @@ -307,6 +307,10 @@ func (l psReporter) Status() string { return l.State() } +func (l psReporter) RunningFor() string { + return l.CreatedHuman() +} + // Command returns the container command in string format func (l psReporter) Command() string { command := strings.Join(l.ListContainer.Command, " ") |