Commit Graph

7 Commits

Author SHA1 Message Date
83d9648a45 Add label filter for docker system prune
This fix tries to address the issue raised in 29999 where it was not
possible to mask these items (like important non-removable stuff)
from `docker system prune`.

This fix adds `label` and `label!` field for `--filter` in `system prune`,
so that it is possible to selectively prune items like:
```
$ docker container prune --filter label=foo

$ docker container prune --filter label!=bar
```

Additional unit tests and integration tests have been added.

This fix fixes 29999.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 702524732427ce028277f99f215e1fab297e6001
Component: engine
2017-04-06 09:11:25 -07:00
3b3c271a31 Fix "command.PromptForConfirmation" to accept "enter" for the "N" default
This adjusts `command.PromptForConfirmation` in `cli/command/utils.go` to use `bufio`'s `ReadLine` rather than using `fmt.Fscan` for reading input, which makes `<Enter>` properly accept the default value of "No" as one would expect.

This new code actually came from `cli/command/plugin/install.go`'s `acceptPrivileges` function, which I've also refactored here to use `command.PromptForConfirmation` as it should.

Additionally, this updates `cli/command/plugin/upgrade.go`'s `runUpgrade` function to use `command.PromptForConfirmation` for further consistency.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 2198b0568f7b7137545757c896191ef2a2bc720e
Component: engine
2017-02-06 09:13:07 -08:00
f61d5bb251 Windows: Use sequential file access
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c98e77c77c5b43bf50e8ae5296b02ce0b47ea188
Component: engine
2017-01-23 10:25:36 -08:00
a586c34f99 Windows: Prompt fix
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 30b8f084436a2a1d5e8523fcd2c5ea64cc805224
Component: engine
2016-12-09 14:27:53 -08:00
9525b615e5 return nil when no node or service to avoid additional api call
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 3af743bb329df9e044d3807cde4200ff6da7bf7c
Component: engine
2016-10-11 10:59:16 +08:00
5cfd36294b Add subcommand prune to the container, volume, image and system commands
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 280c8723667af385e0807a090ddc5cc57c46807e
Component: engine
2016-09-29 07:42:53 -07:00
d8acc366ce Move api/client -> cli/command
Using
  gomvpkg
     -from github.com/docker/docker/api/client
     -to github.com/docker/docker/cli/command
     -vcs_mv_cmd 'git mv {{.Src}} {{.Dst}}'

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0640a14b4fcba3715f7cc3bc9444f3c7f4827edd
Component: engine
2016-09-08 15:46:29 -04:00