From 1cc1f54d90fa701b3d0472b39948d8c43ab9894b Mon Sep 17 00:00:00 2001 From: Gaetan de Villele Date: Wed, 17 May 2017 12:36:09 -0700 Subject: [PATCH] =?UTF-8?q?make=20system=20prune=20=20=E2=80=9C--filter?= =?UTF-8?q?=E2=80=9D=20flag=20available=20only=20for=20docker=2017.04=20(a?= =?UTF-8?q?pi=20v1.28)=20and=20newer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gaetan de Villele --- cli/command/system/prune.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/command/system/prune.go b/cli/command/system/prune.go index 7b77a3be62..11a45146a7 100644 --- a/cli/command/system/prune.go +++ b/cli/command/system/prune.go @@ -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=')") + flags.Var(&options.filter, "filter", "Provide filter values (e.g. 'label==')") + // "filter" flag is available in 1.28 (docker 17.04) and up + flags.SetAnnotation("filter", "version", []string{"1.28"}) return cmd }