diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-25 17:05:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-25 17:05:26 -0400 |
commit | 6a541f6802bf1adf3c78648d4d933ea8d6652ed2 (patch) | |
tree | 16e6250c0dd9df1edae2bf22bc75bcbee36d4583 /pkg/ps | |
parent | 48ce67fb5630e67f17f2460b30a0f9cddc21ab8f (diff) | |
parent | f7b16d0173a363c322b9bc0ded590d410339626f (diff) | |
download | podman-6a541f6802bf1adf3c78648d4d933ea8d6652ed2.tar.gz podman-6a541f6802bf1adf3c78648d4d933ea8d6652ed2.tar.bz2 podman-6a541f6802bf1adf3c78648d4d933ea8d6652ed2.zip |
Merge pull request #6780 from mheon/even_more_201_backports
Even more v2.0.1 backports
Diffstat (limited to 'pkg/ps')
-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(), |