mirror of https://github.com/docker/cli.git
Merge pull request #27872 from vdemeester/images-filter-filters
Add reference filter and deprecated filter param…
This commit is contained in:
commit
356ff43768
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue