cmd/ctr: container list should not look up image
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
81b893ace4
commit
778b1f1c0c
@ -6,7 +6,6 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"text/tabwriter"
|
"text/tabwriter"
|
||||||
|
|
||||||
"github.com/containerd/containerd"
|
|
||||||
tasks "github.com/containerd/containerd/api/services/tasks/v1"
|
tasks "github.com/containerd/containerd/api/services/tasks/v1"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
@ -118,14 +117,9 @@ func containerListFn(context *cli.Context) error {
|
|||||||
labels = "-"
|
labels = "-"
|
||||||
}
|
}
|
||||||
|
|
||||||
var imageName string
|
imageName := c.Info().Image
|
||||||
if image, err := c.Image(ctx); err != nil {
|
if imageName == "" {
|
||||||
if err != containerd.ErrNoImage {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
imageName = "-"
|
imageName = "-"
|
||||||
} else {
|
|
||||||
imageName = image.Name()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
record := c.Info()
|
record := c.Info()
|
||||||
|
Loading…
Reference in New Issue
Block a user