浏览代码

Fix docker exec command help messages

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Lei Jitang 10 年之前
父节点
当前提交
d8b17d785a
共有 4 个文件被更改,包括 4 次插入4 次删除
  1. 1 1
      api/client/commands.go
  2. 1 1
      daemon/execdriver/driver.go
  3. 1 1
      docker/flags.go
  4. 1 1
      docs/sources/reference/commandline/cli.md

+ 1 - 1
api/client/commands.go

@@ -2470,7 +2470,7 @@ func (cli *DockerCli) CmdLoad(args ...string) error {
 }
 }
 
 
 func (cli *DockerCli) CmdExec(args ...string) error {
 func (cli *DockerCli) CmdExec(args ...string) error {
-	cmd := cli.Subcmd("exec", "CONTAINER COMMAND [ARG...]", "Run a command in an existing container")
+	cmd := cli.Subcmd("exec", "CONTAINER COMMAND [ARG...]", "Run a command in a running container")
 
 
 	execConfig, err := runconfig.ParseExec(cmd, args)
 	execConfig, err := runconfig.ParseExec(cmd, args)
 	if err != nil {
 	if err != nil {

+ 1 - 1
daemon/execdriver/driver.go

@@ -42,7 +42,7 @@ type TtyTerminal interface {
 
 
 type Driver interface {
 type Driver interface {
 	Run(c *Command, pipes *Pipes, startCallback StartCallback) (int, error) // Run executes the process and blocks until the process exits and returns the exit code
 	Run(c *Command, pipes *Pipes, startCallback StartCallback) (int, error) // Run executes the process and blocks until the process exits and returns the exit code
-	// Exec executes the process in an existing container, blocks until the process exits and returns the exit code
+	// Exec executes the process in a running container, blocks until the process exits and returns the exit code
 	Exec(c *Command, processConfig *ProcessConfig, pipes *Pipes, startCallback StartCallback) (int, error)
 	Exec(c *Command, processConfig *ProcessConfig, pipes *Pipes, startCallback StartCallback) (int, error)
 	Kill(c *Command, sig int) error
 	Kill(c *Command, sig int) error
 	Pause(c *Command) error
 	Pause(c *Command) error

+ 1 - 1
docker/flags.go

@@ -62,7 +62,7 @@ func init() {
 			{"create", "Create a new container"},
 			{"create", "Create a new container"},
 			{"diff", "Inspect changes on a container's filesystem"},
 			{"diff", "Inspect changes on a container's filesystem"},
 			{"events", "Get real time events from the server"},
 			{"events", "Get real time events from the server"},
-			{"exec", "Run a command in an existing container"},
+			{"exec", "Run a command in a running container"},
 			{"export", "Stream the contents of a container as a tar archive"},
 			{"export", "Stream the contents of a container as a tar archive"},
 			{"history", "Show the history of an image"},
 			{"history", "Show the history of an image"},
 			{"images", "List images"},
 			{"images", "List images"},

+ 1 - 1
docs/sources/reference/commandline/cli.md

@@ -637,7 +637,7 @@ You'll need two shells for this example.
 
 
     Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
     Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
 
 
-    Run a command in an existing container
+    Run a command in a running container
 
 
       -d, --detach=false         Detached mode: run command in the background
       -d, --detach=false         Detached mode: run command in the background
       -i, --interactive=false    Keep STDIN open even if not attached
       -i, --interactive=false    Keep STDIN open even if not attached