mirror of https://github.com/docker/cli.git
make system prune “--filter” flag available only for docker 17.04 (api v1.28) and newer
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
This commit is contained in:
parent
b28c4822cc
commit
1cc1f54d90
|
@ -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…
Reference in New Issue