summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorAshley Cui <acui@redhat.com>2020-07-30 13:50:50 -0400
committerMatthew Heon <matthew.heon@pm.me>2020-07-31 11:44:53 -0400
commit2cc9af369290428ca3d5e96bee5b65262b57a1f7 (patch)
tree5ee3bd565c4a660819f58e8032348551701bbaa4 /cmd
parent994dc3294291e07926954737c3874457affb9994 (diff)
downloadpodman-2cc9af369290428ca3d5e96bee5b65262b57a1f7.tar.gz
podman-2cc9af369290428ca3d5e96bee5b65262b57a1f7.tar.bz2
podman-2cc9af369290428ca3d5e96bee5b65262b57a1f7.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.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/containers/ps.go b/cmd/podman/containers/ps.go
index 7c84cbae1..34f06d349 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, " ")