Skip to content

Commit

Permalink
Merge pull request moby#27872 from vdemeester/images-filter-filters
Browse files Browse the repository at this point in the history
Add reference filter and deprecated filter param…
  • Loading branch information
cpuguy83 committed Nov 11, 2016
2 parents 57da27f + 3c61af0 commit 356ff43
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions command/image/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,14 @@ func newListCommand(dockerCli *command.DockerCli) *cobra.Command {
func runImages(dockerCli *command.DockerCli, opts imagesOptions) error {
ctx := context.Background()

filters := opts.filter.Value()
if opts.matchName != "" {
filters.Add("reference", opts.matchName)
}

options := types.ImageListOptions{
MatchName: opts.matchName,
All: opts.all,
Filters: opts.filter.Value(),
All: opts.all,
Filters: filters,
}

images, err := dockerCli.Client().ImageList(ctx, options)
Expand Down

0 comments on commit 356ff43

Please sign in to comment.