Merge pull request #21 from aduermael/prune-security

prune commands : make sure label filters are considered
This commit is contained in:
Tibor Vass 2017-05-17 16:23:27 -07:00 committed by GitHub
commit 63ecaf1d4f
1 changed files with 3 additions and 1 deletions

View File

@ -34,7 +34,9 @@ func NewPruneCommand(dockerCli command.Cli) *cobra.Command {
flags := cmd.Flags()
flags.BoolVarP(&options.force, "force", "f", false, "Do not prompt for confirmation")
flags.BoolVarP(&options.all, "all", "a", false, "Remove all unused images not just dangling ones")
flags.Var(&options.filter, "filter", "Provide filter values (e.g. 'until=<timestamp>')")
flags.Var(&options.filter, "filter", "Provide filter values (e.g. 'label=<key>=<value>')")
// "filter" flag is available in 1.28 (docker 17.04) and up
flags.SetAnnotation("filter", "version", []string{"1.28"})
return cmd
}