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

Clarify meaning of docker attach

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
This commit is contained in:
Misty Stanley-Jones 2017-03-31 13:22:21 -07:00
parent 3d31198cda
commit 1922eac4cc
2 changed files with 8 additions and 5 deletions

View file

@ -28,7 +28,7 @@ func NewAttachCommand(dockerCli *command.DockerCli) *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "attach [OPTIONS] CONTAINER", Use: "attach [OPTIONS] CONTAINER",
Short: "Attach to a running container", Short: "Attach local standard input, output, and error streams to a running container",
Args: cli.ExactArgs(1), Args: cli.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
opts.container = args[0] opts.container = args[0]

View file

@ -18,7 +18,7 @@ keywords: "attach, running, container"
```markdown ```markdown
Usage: docker attach [OPTIONS] CONTAINER Usage: docker attach [OPTIONS] CONTAINER
Attach to a running container Attach local standard input, output, and error streams to a running container
Options: Options:
--detach-keys string Override the key sequence for detaching a container --detach-keys string Override the key sequence for detaching a container
@ -29,10 +29,13 @@ Options:
## Description ## Description
Use `docker attach` to attach to a running container using the container's ID Use `docker attach` to attach your terminal's standard input, output, and error
or name, either to view its ongoing output or to control it interactively. (or any combination of the three) to a running container using the container's
ID or name. This allows you to view its ongoing output or to control it
interactively, as though the commands were running directly in your terminal.
You can attach to the same contained process multiple times simultaneously, You can attach to the same contained process multiple times simultaneously,
screen sharing style, or quickly view the progress of your detached process. even as a different user with the appropriate permissions.
To stop a container, use `CTRL-c`. This key sequence sends `SIGKILL` to the To stop a container, use `CTRL-c`. This key sequence sends `SIGKILL` to the
container. If `--sig-proxy` is true (the default),`CTRL-c` sends a `SIGINT` to container. If `--sig-proxy` is true (the default),`CTRL-c` sends a `SIGINT` to