mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
allow filtering containers by any status
Signed-off-by: Kamil Domański <kamil@domanski.co>
This commit is contained in:
parent
e4dadeed88
commit
9ada6a06c5
2 changed files with 3 additions and 4 deletions
|
@ -149,9 +149,8 @@ func (daemon *Daemon) foldFilter(config *ContainersConfig) (*listContext, error)
|
|||
if !isValidStateString(value) {
|
||||
return nil, errors.New("Unrecognised filter value for status")
|
||||
}
|
||||
if value == "exited" || value == "created" {
|
||||
config.All = true
|
||||
}
|
||||
|
||||
config.All = true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ Query Parameters:
|
|||
sizes
|
||||
- **filters** - a JSON encoded value of the filters (a `map[string][]string`) to process on the containers list. Available filters:
|
||||
- `exited=<int>`; -- containers with exit code of `<int>` ;
|
||||
- `status=`(`created`|`restarting`|`running`|`paused`|`exited`)
|
||||
- `status=`(`created`|`restarting`|`running`|`paused`|`exited`|`dead`)
|
||||
- `label=key` or `label="key=value"` of a container label
|
||||
|
||||
Status Codes:
|
||||
|
|
Loading…
Add table
Reference in a new issue