Sebastiaan van Stijn
e380ddaddf
Fix panic when pruning images with label-filter
Before this change:
docker image prune --force --filter "label=foobar"
panic: assignment to entry in nil map
goroutine 1 [running]:
github.com/docker/cli/vendor/github.com/docker/docker/api/types/filters.Args.Add(...)
/go/src/github.com/docker/cli/vendor/github.com/docker/docker/api/types/filters/parse.go:167
github.com/docker/cli/cli/command/image.runPrune(0x1db3a20, 0xc000344cf0, 0x16e0001, 0xc00015e600, 0x4, 0x3, 0xc00024e160, 0xc000545c70, 0x5ab4b5)
/go/src/github.com/docker/cli/cli/command/image/prune.go:79 +0xbaf
github.com/docker/cli/cli/command/image.NewPruneCommand.func1(0xc00029ef00, 0xc0004a8180, 0x0, 0x3, 0x0, 0x0)
/go/src/github.com/docker/cli/cli/command/image/prune.go:32 +0x64
github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).execute(0xc00029ef00, 0xc000038210, 0x3, 0x3, 0xc00029ef00, 0xc000038210)
/go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:762 +0x473
github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc000127180, 0xc000272770, 0x1836ce0, 0xc000272780)
/go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:852 +0x2fd
github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).Execute(0xc000127180, 0xc000127180, 0x1d60880)
/go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:800 +0x2b
main.main()
/go/src/github.com/docker/cli/cmd/docker/docker.go:180 +0xdc
With this patch applied:
docker image prune --force --filter "label=foobar"
Total reclaimed space: 0B
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1e1dd5bca4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-12-07 17:58:38 +01:00
..
2018-10-17 00:37:24 +00:00
2018-06-08 18:24:26 +02:00
2018-06-08 18:24:26 +02:00
2018-09-11 16:57:54 +02:00
2018-07-06 15:49:32 -04:00
2018-09-05 03:33:30 +00:00
2018-10-18 14:56:59 -07:00
2018-09-22 01:33:03 +00:00
2018-06-08 18:24:26 +02:00
2018-12-07 17:58:38 +01:00
2018-06-08 18:24:26 +02:00
2018-11-29 17:15:06 +01:00
2018-09-05 03:33:30 +00:00
2018-07-06 15:49:32 -04:00
2018-07-05 12:35:53 -04:00
2018-08-20 09:42:05 -07:00
2018-07-06 15:49:32 -04:00
2018-07-27 15:37:43 +02:00
2018-08-10 15:13:45 -04:00
2018-08-21 14:34:00 -04:00
2018-11-21 22:01:54 +00:00
2018-06-08 18:24:26 +02:00
2018-10-25 15:30:17 +02:00
2018-09-05 03:33:30 +00:00
2018-10-17 17:48:07 +02:00
2018-10-17 17:47:58 +02:00
2017-09-01 19:41:06 -04:00
2017-05-03 18:41:19 -07:00
2018-06-22 13:58:39 -07:00
2018-06-22 13:58:39 -07:00
2017-09-01 19:41:06 -04:00
2018-08-20 09:42:05 -07:00
2018-08-20 09:42:05 -07:00
2017-05-03 18:41:19 -07:00
2018-03-08 15:00:43 -05:00
2018-07-27 15:37:43 +02:00