diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-02-23 13:00:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-23 13:00:10 -0500 |
commit | 18dcb84d641f4e8ae7fa31fa446d9461e0c915ab (patch) | |
tree | 2eded21423db3b433d873e9cbcc614e8a7931cef /pkg/adapter/containers.go | |
parent | eef9875a6133d4cbf4e6f63771dd86045f071f7d (diff) | |
parent | fab5b35b2ace79564ce182979887f5a062a0e55f (diff) | |
download | podman-18dcb84d641f4e8ae7fa31fa446d9461e0c915ab.tar.gz podman-18dcb84d641f4e8ae7fa31fa446d9461e0c915ab.tar.bz2 podman-18dcb84d641f4e8ae7fa31fa446d9461e0c915ab.zip |
Merge pull request #4889 from baude/portsearch
fix port list by container with port
Diffstat (limited to 'pkg/adapter/containers.go')
-rw-r--r-- | pkg/adapter/containers.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/adapter/containers.go b/pkg/adapter/containers.go index ab4255f89..78057e3f9 100644 --- a/pkg/adapter/containers.go +++ b/pkg/adapter/containers.go @@ -1116,7 +1116,11 @@ func (r *LocalRuntime) Port(c *cliconfig.PortValues) ([]*Container, error) { ) if !c.All { - containers, err = shortcuts.GetContainersByContext(false, c.Latest, c.InputArgs, r.Runtime) + names := []string{} + if len(c.InputArgs) >= 1 { + names = []string{c.InputArgs[0]} + } + containers, err = shortcuts.GetContainersByContext(false, c.Latest, names, r.Runtime) } else { containers, err = r.Runtime.GetRunningContainers() } |