|
@@ -68,6 +68,7 @@ func (srv *Server) Help() string {
|
|
{"stop", "Stop a running container"},
|
|
{"stop", "Stop a running container"},
|
|
{"tar", "Stream the contents of a container as a tar archive"},
|
|
{"tar", "Stream the contents of a container as a tar archive"},
|
|
{"umount", "(debug only) Mount a container's filesystem"},
|
|
{"umount", "(debug only) Mount a container's filesystem"},
|
|
|
|
+ {"version", "Show the docker version information"},
|
|
{"wait", "Block until a container stops, then print its exit code"},
|
|
{"wait", "Block until a container stops, then print its exit code"},
|
|
{"web", "A web UI for docker"},
|
|
{"web", "A web UI for docker"},
|
|
{"write", "Write the contents of standard input to a container's file"},
|
|
{"write", "Write the contents of standard input to a container's file"},
|
|
@@ -97,6 +98,12 @@ func (srv *Server) CmdWait(stdin io.ReadCloser, stdout io.Writer, args ...string
|
|
return nil
|
|
return nil
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// 'docker version': show version information
|
|
|
|
+func (srv *Server) CmdVersion(stdin io.ReadCloser, stdout io.Writer, args ...string) error {
|
|
|
|
+ fmt.Fprintf(stdout, "Version:%s\n", VERSION)
|
|
|
|
+ return nil
|
|
|
|
+}
|
|
|
|
+
|
|
// 'docker info': display system-wide information.
|
|
// 'docker info': display system-wide information.
|
|
func (srv *Server) CmdInfo(stdin io.ReadCloser, stdout io.Writer, args ...string) error {
|
|
func (srv *Server) CmdInfo(stdin io.ReadCloser, stdout io.Writer, args ...string) error {
|
|
cmd := rcli.Subcmd(stdout, "info", "", "Display system-wide information.")
|
|
cmd := rcli.Subcmd(stdout, "info", "", "Display system-wide information.")
|
|
@@ -912,7 +919,7 @@ func New() (*Server, error) {
|
|
return nil, err
|
|
return nil, err
|
|
}
|
|
}
|
|
srv := &Server{
|
|
srv := &Server{
|
|
- images: images,
|
|
|
|
|
|
+ images: images,
|
|
containers: containers,
|
|
containers: containers,
|
|
}
|
|
}
|
|
return srv, nil
|
|
return srv, nil
|