浏览代码

Add 2 missing cli commands to docs (events + insert) and alphabetically order docker output

Thijs Terlouw 11 年之前
父节点
当前提交
6380b42edb

+ 1 - 0
AUTHORS

@@ -104,6 +104,7 @@ Solomon Hykes <solomon@dotcloud.com>
 Sridhar Ratnakumar <sridharr@activestate.com>
 Sridhar Ratnakumar <sridharr@activestate.com>
 Stefan Praszalowicz <stefan@greplin.com>
 Stefan Praszalowicz <stefan@greplin.com>
 Thatcher Peskens <thatcher@dotcloud.com>
 Thatcher Peskens <thatcher@dotcloud.com>
+Thijs Terlouw <thijsterlouw@gmail.com>
 Thomas Bikeev <thomas.bikeev@mac.com>
 Thomas Bikeev <thomas.bikeev@mac.com>
 Thomas Hansen <thomas.hansen@gmail.com>
 Thomas Hansen <thomas.hansen@gmail.com>
 Tianon Gravi <admwiggin@gmail.com>
 Tianon Gravi <admwiggin@gmail.com>

+ 1 - 1
commands.go

@@ -91,7 +91,6 @@ func (cli *DockerCli) CmdHelp(args ...string) error {
 		{"login", "Register or Login to the docker registry server"},
 		{"login", "Register or Login to the docker registry server"},
 		{"logs", "Fetch the logs of a container"},
 		{"logs", "Fetch the logs of a container"},
 		{"port", "Lookup the public-facing port which is NAT-ed to PRIVATE_PORT"},
 		{"port", "Lookup the public-facing port which is NAT-ed to PRIVATE_PORT"},
-		{"top", "Lookup the running processes of a container"},
 		{"ps", "List containers"},
 		{"ps", "List containers"},
 		{"pull", "Pull an image or a repository from the docker registry server"},
 		{"pull", "Pull an image or a repository from the docker registry server"},
 		{"push", "Push an image or a repository to the docker registry server"},
 		{"push", "Push an image or a repository to the docker registry server"},
@@ -103,6 +102,7 @@ func (cli *DockerCli) CmdHelp(args ...string) error {
 		{"start", "Start a stopped container"},
 		{"start", "Start a stopped container"},
 		{"stop", "Stop a running container"},
 		{"stop", "Stop a running container"},
 		{"tag", "Tag an image into a repository"},
 		{"tag", "Tag an image into a repository"},
+		{"top", "Lookup the running processes of a container"},
 		{"version", "Show the docker version information"},
 		{"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"},
 	} {
 	} {

+ 34 - 0
docs/sources/commandline/command/events.rst

@@ -0,0 +1,34 @@
+:title: Events Command
+:description: Get real time events from the server
+:keywords: events, docker, documentation
+
+=================================================================
+``events`` -- Get real time events from the server
+=================================================================
+
+::
+
+    Usage: docker events
+
+    Get real time events from the server
+
+Examples
+--------
+
+Starting and stopping a container
+.................................
+
+.. code-block:: bash
+
+    $ sudo docker start 4386fb97867d
+    $ sudo docker stop 4386fb97867d
+
+In another shell
+
+.. code-block:: bash
+    
+    $ sudo docker events
+    [2013-09-03 15:49:26 +0200 CEST] 4386fb97867d: (from 12de384bfb10) start
+    [2013-09-03 15:49:29 +0200 CEST] 4386fb97867d: (from 12de384bfb10) die
+    [2013-09-03 15:49:29 +0200 CEST] 4386fb97867d: (from 12de384bfb10) stop
+

+ 23 - 0
docs/sources/commandline/command/insert.rst

@@ -0,0 +1,23 @@
+:title: Insert Command
+:description: Insert a file in an image
+:keywords: insert, image, docker, documentation
+
+==========================================================================
+``insert`` -- Insert a file in an image
+==========================================================================
+
+::
+
+    Usage: docker insert IMAGE URL PATH
+
+    Insert a file from URL in the IMAGE at PATH
+
+Examples
+--------
+
+Insert file from github
+.......................
+
+.. code-block:: bash
+
+    $ sudo docker insert 8283e18b24bc https://raw.github.com/metalivedev/django/master/postinstall /tmp/postinstall.sh

+ 2 - 0
docs/sources/commandline/index.rst

@@ -17,11 +17,13 @@ Contents:
   commit  <command/commit>
   commit  <command/commit>
   cp      <command/cp>
   cp      <command/cp>
   diff    <command/diff>
   diff    <command/diff>
+  events  <command/events>
   export  <command/export>
   export  <command/export>
   history <command/history>
   history <command/history>
   images  <command/images>
   images  <command/images>
   import  <command/import>
   import  <command/import>
   info    <command/info>
   info    <command/info>
+  insert  <command/insert>
   inspect <command/inspect>
   inspect <command/inspect>
   kill    <command/kill>
   kill    <command/kill>
   login   <command/login>
   login   <command/login>