Adding exec remote API documentation along with minor code cleanup.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
This commit is contained in:
Vishnu Kannan 2014-09-17 18:36:51 +00:00 committed by Tibor Vass
parent 5419043a5d
commit 6f116d084a
1 changed files with 6 additions and 7 deletions

View File

@ -555,25 +555,24 @@ You'll need two shells for this example.
-i, --interactive=false Keep STDIN open even if not attached
-t, --tty=false Allocate a pseudo-TTY
The `docker exec` command runs a user specified command as a new process in an existing
user specified container. The container needs to be active.
The `docker exec` command runs a new command in a running container.
The `docker exec` command will typically be used after `docker run`.
The `docker exec` command will typically be used after `docker run` or `docker start`.
### Examples:
$ sudo docker run --name ubuntu_bash --rm -i -t ubuntu bash
This will create a container named 'ubuntu_bash' and start a bash session.
This will create a container named `ubuntu_bash` and start a Bash session.
$ sudo docker exec -d ubuntu_bash touch /tmp/execWorks
This will create a new file '/tmp/execWorks' inside the existing and active container
'ubuntu_bash', in the background.
This will create a new file `/tmp/execWorks` inside the running container
`ubuntu_bash`, in the background.
$ sudo docker exec ubuntu_bash -it bash
This will create a new bash session in the container 'ubuntu_bash'.
This will create a new Bash session in the container `ubuntu_bash`.
## export