Merge pull request #21 from aduermael/prune-security
prune commands : make sure label filters are considered
This commit is contained in:
commit
63ecaf1d4f
@ -34,7 +34,9 @@ func NewPruneCommand(dockerCli command.Cli) *cobra.Command {
|
|||||||
flags := cmd.Flags()
|
flags := cmd.Flags()
|
||||||
flags.BoolVarP(&options.force, "force", "f", false, "Do not prompt for confirmation")
|
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.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
|
return cmd
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user