summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-02-28 10:03:13 -0800
committerGitHub <noreply@github.com>2019-02-28 10:03:13 -0800
commit2e463b7720769d85dcdae516cad96c57e96b7464 (patch)
tree5869d2790f890cf9005748325766bb065a605b64
parent5afae0b25bba4e2274747b32cf8b3bc929daf06e (diff)
parent3eb1d3c08a05d8cbdcdb7ce9594339b142a679d7 (diff)
downloadpodman-2e463b7720769d85dcdae516cad96c57e96b7464.tar.gz
podman-2e463b7720769d85dcdae516cad96c57e96b7464.tar.bz2
podman-2e463b7720769d85dcdae516cad96c57e96b7464.zip
Merge pull request #2478 from baude/portbz1683734
podman port fix output
-rw-r--r--cmd/podman/port.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/podman/port.go b/cmd/podman/port.go
index 1c3086536..ffb5749fb 100644
--- a/cmd/podman/port.go
+++ b/cmd/podman/port.go
@@ -128,9 +128,6 @@ func portCmd(c *cliconfig.PortValues) error {
if state, _ := con.State(); state != libpod.ContainerStateRunning {
continue
}
- if c.All {
- fmt.Println(con.ID())
- }
portmappings, err := con.PortMappings()
if err != nil {
@@ -143,6 +140,9 @@ func portCmd(c *cliconfig.PortValues) error {
if hostIP == "" {
hostIP = "0.0.0.0"
}
+ if c.All {
+ fmt.Printf("%s\t", con.ID()[:12])
+ }
// If not searching by port or port/proto, then dump what we see
if port == "" {
fmt.Printf("%d/%s -> %s:%d\n", v.ContainerPort, v.Protocol, hostIP, v.HostPort)