diff --git a/cli/command/image/list.go b/cli/command/image/list.go index 887ca9c9a4..b0df7aa2a1 100644 --- a/cli/command/image/list.go +++ b/cli/command/image/list.go @@ -68,12 +68,10 @@ func runImages(ctx context.Context, dockerCli command.Cli, options imagesOptions filters.Add("reference", options.matchName) } - listOptions := image.ListOptions{ + images, err := dockerCli.Client().ImageList(ctx, image.ListOptions{ All: options.all, Filters: filters, - } - - images, err := dockerCli.Client().ImageList(ctx, listOptions) + }) if err != nil { return err }