Description
This got in through the docs.docker.com feedback form;
The line " If there is more than one filter, then pass multiple flags (e.g., --filter "foo=bar" --filter "bif=baz")" unfortunately does NOT say if multiple filters are ANDed or ORed. For prune commands, this is very important, though.
It was reported for docker volume prune, but likely the same applies to other prune commands;
https://docs.docker.com/reference/cli/docker/volume/prune/
|
### <a name="filter"></a> Filtering (--filter) |
|
|
|
The filtering flag (`--filter`) format is of "key=value". If there is more |
|
than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`) |
|
|
|
The currently supported filters are: |
|
|
|
* label (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) - only remove volumes with (or without, in case `label!=...` is used) the specified labels. |
|
|
|
The `label` filter accepts two formats. One is the `label=...` (`label=<key>` or `label=<key>=<value>`), |
|
which removes volumes with the specified labels. The other |
|
format is the `label!=...` (`label!=<key>` or `label!=<key>=<value>`), which removes |
|
volumes without the specified labels. |
We need to verify the behavior (behavior of some of the filter options haven't been documented well when combined with other filters, or same filter applied multiple times), and update the documentation accordingly to make it less ambiguous.
Description
This got in through the docs.docker.com feedback form;
It was reported for
docker volume prune, but likely the same applies to otherprunecommands;https://docs.docker.com/reference/cli/docker/volume/prune/
cli/docs/reference/commandline/volume_prune.md
Lines 40 to 52 in f9b3c8c
We need to verify the behavior (behavior of some of the filter options haven't been documented well when combined with other filters, or same filter applied multiple times), and update the documentation accordingly to make it less ambiguous.