mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Allow docker stats without arguments
This patch adds the ability to run `docker stats` w/o arguments and get statistics for all running containers by default. Also add a new `--all` flag to list statistics for all containers (like `docker ps`). New running containers are added to the list as they show up also. Add integration tests for this new behavior. Docs updated accordingly. Fix missing stuff in man/commandline reference for `docker stats`. Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
committed by
Antonio Murdaca
parent
7a19164c17
commit
ae818a820f
@@ -24,7 +24,6 @@ type ContainerStatsConfig struct {
|
||||
// ContainerStats writes information about the container to the stream
|
||||
// given in the config object.
|
||||
func (daemon *Daemon) ContainerStats(prefixOrName string, config *ContainerStatsConfig) error {
|
||||
|
||||
container, err := daemon.Get(prefixOrName)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user