Merge pull request #27872 from vdemeester/images-filter-filters
Add reference filter and deprecated filter param…
Upstream-commit: 356ff43768
Component: cli
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user