Adding exec remote API documentation along with minor code cleanup.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan (github: vishh)
@@ -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
