allow filtering containers by any status

Signed-off-by: Kamil Domański <kamil@domanski.co>
(cherry picked from commit 9ada6a06c5)
This commit is contained in:
Kamil Domański 2015-10-15 13:04:13 +02:00 committed by David Calavera
parent aade9536b6
commit f30364c583
2 changed files with 3 additions and 4 deletions

View File

@ -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
}
}

View File

@ -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)