allow filtering containers by any status
Signed-off-by: Kamil Domański <kamil@domanski.co> (cherry picked from commit 9ada6a06c57ce4ed4bfad50f603962b7b9ce6fb1) Upstream-commit: f30364c5835452598e58781f360681f2d77fa16c Component: engine
This commit is contained in:
committed by
David Calavera
parent
c97969e0fa
commit
1d7fc30a8e
@ -150,9 +150,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
|
||||
- `isolation=`(`default`|`process`|`hyperv`) (Windows daemon only)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user