diff options
Diffstat (limited to 'pkg/domain/infra/tunnel/helpers.go')
-rw-r--r-- | pkg/domain/infra/tunnel/helpers.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/domain/infra/tunnel/helpers.go b/pkg/domain/infra/tunnel/helpers.go index d5a3224c2..11fca5278 100644 --- a/pkg/domain/infra/tunnel/helpers.go +++ b/pkg/domain/infra/tunnel/helpers.go @@ -2,6 +2,7 @@ package tunnel import ( "context" + "strings" "github.com/containers/libpod/pkg/api/handlers/libpod" "github.com/containers/libpod/pkg/bindings" @@ -27,7 +28,7 @@ func getContainersByContext(contextWithConnection context.Context, all bool, nam for _, id := range namesOrIds { var found bool for _, con := range c { - if id == con.ID || util.StringInSlice(id, con.Names) { + if id == con.ID || strings.HasPrefix(con.ID, id) || util.StringInSlice(id, con.Names) { cons = append(cons, con) found = true break |