The `is-task` filter was only documented in the usage
section, but this section is not used in the documentation.
This patch adds the missing filter, synchronises the
man page source, and does some slight rephrasing
and reformatting of the filters.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 46064f33f4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The "until" filter is supported by all object types, except for
volumes.
Before this patch, the "until" filter would attempted to be used for the volume
prune endpoint, resulting in an error being returned by the daemon, and
further prune endpoints (networks, images) to be skipped.
$ docker system prune --filter until=24h --filter label=label.foo=bar
WARNING! This will remove:
- all stopped containers
- all volumes not used by at least one container
- all networks not used by at least one container
- all dangling images
Are you sure you want to continue? [y/N] y
Error response from daemon: Invalid filter 'until'
Calling POST /v1.30/containers/prune?filters=%7B%22label%22%3A%7B%22label.foo%3D%3Dbar%22%3Atrue%7D%2C%22until%22%3A%7B%2224h%22%3Atrue%7D%7D
Calling POST /v1.30/volumes/prune?filters=%7B%22label%22%3A%7B%22label.foo%3D%3Dbar%22%3Atrue%7D%2C%22until%22%3A%7B%2224h%22%3Atrue%7D%7D
Handler for POST /v1.30/volumes/prune returned error: Invalid filter 'until'
Error response from daemon: Invalid filter 'until'
With this patch, an error is produced instead, preventing "partial" prune.
$ docker system prune --filter until=24h --filter label=foo==bar --volumes
ERROR: The "until" filter is not supported with "--volumes"
Note that `docker volume prune` does not have this problem, and produces an
error if the `until` filter is used;
$ docker volume prune --filter until=24h
WARNING! This will remove all volumes not used by at least one container.
Are you sure you want to continue? [y/N] y
Error response from daemon: Invalid filter 'until'
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3c095dc546)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
bash completion usually completes boolean options that default to `true`
with the `=false` suffix because that is the only syntax that really
changes behavior.
For this option, I implemented completion falsely.
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit fc0dafbbd1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The completion logic should be implemented in the documented subcommands
(ls, rm) and delegated to from the aliases (list, remove).
For the rm|remove pair, this was implemented vice versa.
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit d585e554d5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Originally from commit titled: Set ping version even on error
which was cherry picked from upstream commit 27ef09a of component engine.
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
and add a test.
Signed-off-by: Ying Li <ying.li@docker.com>
(cherry picked from commit 4615c92f66)
Conflicts:
components/cli/cli/command/swarm/ca_test.go
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit ebfdfc5768b74e0a52875cf76a0576bfcd66445c)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
The `--network` option is only available for `docker service create`.
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit e7e77b5e65)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
`--internal` is a boolean option. It was falsely treated as non-boolean.
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 12dc9eb11f)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>