Support podman ps --format '{{ .Label label }}'

Also Support for podman pod ps  --format '{{ .Label label }}'

Finally fix support for --format '{{ .Podname }}'
   When user specifies .Podname this implies --pod was passed.

Fixes: https://github.com/containers/podman/issues/20957

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2023-12-09 07:44:26 -05:00
parent a5c8bb25cc
commit f51ff77644
4 changed files with 51 additions and 1 deletions

View File

@ -90,7 +90,7 @@ Valid placeholders for the Go template are listed below:
| .Networks | Show all networks connected to the container |
| .Pid | Process ID on host system |
| .Pod | Pod the container is associated with (SHA) |
| .PodName | Seems to be empty no matter what |
| .PodName | PodName of the container |
| .Ports | Exposed ports |
| .Restarts | Display the container restart count |
| .RunningFor | Time elapsed since container was started |