1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

"docker info": display system-wide information.

This commit is contained in:
Solomon Hykes 2013-02-04 23:37:25 -08:00
parent edc9968604
commit a608f5e3b8

View file

@ -21,6 +21,7 @@ import (
"sync"
)
const VERSION = "0.0.1"
func (srv *Server) Name() string {
return "docker"
@ -50,6 +51,14 @@ func (srv *Server) Help() string {
return help
}
// 'docker info': display system-wide information.
func (srv *Server) CmdInfo(stdin io.ReadCloser, stdout io.Writer, args ...string) error {
fmt.Fprintf(stdout, "containers: %d\nversion: %s\nimages: %d\n",
len(srv.containers.List()),
VERSION,
len(srv.images.ById))
return nil
}
func (srv *Server) CmdStop(stdin io.ReadCloser, stdout io.Writer, args ...string) error {
cmd := rcli.Subcmd(stdout, "stop", "[OPTIONS] NAME", "Stop a running container")