diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-02-13 21:30:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-13 21:30:00 +0100 |
commit | e86aec78551d8f792fd6d7e1f450e16bebd14701 (patch) | |
tree | 3a3cc4ac3c95f4f5eb544caadb6643faf5c9e21f /cmd/podman/shared/container.go | |
parent | fa3b91dc1216e6057e24a574bec566401800d780 (diff) | |
parent | dd74467fd8dcbdab35b4c7fc2dc183d12fb228f2 (diff) | |
download | podman-e86aec78551d8f792fd6d7e1f450e16bebd14701.tar.gz podman-e86aec78551d8f792fd6d7e1f450e16bebd14701.tar.bz2 podman-e86aec78551d8f792fd6d7e1f450e16bebd14701.zip |
Merge pull request #2331 from baude/issue846
show container ports of network namespace
Diffstat (limited to 'cmd/podman/shared/container.go')
-rw-r--r-- | cmd/podman/shared/container.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/podman/shared/container.go b/cmd/podman/shared/container.go index c74d8fdce..81811e0f2 100644 --- a/cmd/podman/shared/container.go +++ b/cmd/podman/shared/container.go @@ -213,11 +213,16 @@ func NewBatchContainer(ctr *libpod.Container, opts PsOptions) (PsContainerOutput } } + ports, err := ctr.PortMappings() + if err != nil { + logrus.Errorf("unable to lookup namespace container for %s", ctr.ID()) + } + pso.ID = cid pso.Image = imageName pso.Command = command pso.Created = created - pso.Ports = portsToString(ctr.PortMappings()) + pso.Ports = portsToString(ports) pso.Names = ctr.Name() pso.IsInfra = ctr.IsInfra() pso.Status = status |