diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-25 13:22:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-25 13:22:36 -0400 |
commit | 358e69cc2da255b5acf17b3a986dde84cbbf8633 (patch) | |
tree | eb12b7e5acd1fca9b58e05c2cadfa712de6c4eb0 /pkg | |
parent | 12761ede68d1fd55c0da6d5651c5ee8cf33f421b (diff) | |
parent | 16b3356a89ba97ec4d7752d43dfe2e695cf4ca82 (diff) | |
download | podman-358e69cc2da255b5acf17b3a986dde84cbbf8633.tar.gz podman-358e69cc2da255b5acf17b3a986dde84cbbf8633.tar.bz2 podman-358e69cc2da255b5acf17b3a986dde84cbbf8633.zip |
Merge pull request #6761 from mheon/fix_ps_portmappings
Print port mappings in `ps` for ctrs sharing network
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/ps/ps.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkg/ps/ps.go b/pkg/ps/ps.go index b07eb7f9a..cbac2cb06 100644 --- a/pkg/ps/ps.go +++ b/pkg/ps/ps.go @@ -145,11 +145,15 @@ func ListContainerBatch(rt *libpod.Runtime, ctr *libpod.Container, opts entities } return nil }) - if batchErr != nil { return entities.ListContainer{}, batchErr } + portMappings, err := ctr.PortMappings() + if err != nil { + return entities.ListContainer{}, err + } + ps := entities.ListContainer{ Command: conConfig.Command, Created: conConfig.CreatedTime.Unix(), @@ -165,7 +169,7 @@ func ListContainerBatch(rt *libpod.Runtime, ctr *libpod.Container, opts entities Names: []string{conConfig.Name}, Pid: pid, Pod: conConfig.Pod, - Ports: conConfig.PortMappings, + Ports: portMappings, Size: size, StartedAt: startedTime.Unix(), State: conState.String(), |