Merge pull request #27872 from vdemeester/images-filter-filters

Add reference filter and deprecated filter param…
This commit is contained in:
Brian Goff 2016-11-11 11:24:19 -05:00 committed by GitHub
commit 356ff43768
1 changed files with 7 additions and 3 deletions

View File

@ -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)