From 447387474a5379f941457ece191c6920191c2a35 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Tue, 11 Nov 2014 15:54:31 +1000 Subject: [PATCH] Add some details about the lifecycle of commands started with docker exec Signed-off-by: Sven Dowideit --- docs/man/docker-exec.1.md | 6 ++++++ docs/sources/reference/commandline/cli.md | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/man/docker-exec.1.md b/docs/man/docker-exec.1.md index d5ec1265bd..38ba3de412 100644 --- a/docs/man/docker-exec.1.md +++ b/docs/man/docker-exec.1.md @@ -15,6 +15,12 @@ docker-exec - Run a command in a running container Run a process in a running container. +The command started using `docker exec` will only run while the container's primary +process (`PID 1`) is running, and will not be restarted if the container is restarted. + +If the container is paused, then the `docker exec` command will wait until the +container is unpaused, and then run. + # Options **-d**, **--detach**=*true*|*false* diff --git a/docs/sources/reference/commandline/cli.md b/docs/sources/reference/commandline/cli.md index 50c0ff3cce..e0a7b2328a 100644 --- a/docs/sources/reference/commandline/cli.md +++ b/docs/sources/reference/commandline/cli.md @@ -646,7 +646,11 @@ You'll need two shells for this example. The `docker exec` command runs a new command in a running container. -The `docker exec` command will typically be used after `docker run` or `docker start`. +The command started using `docker exec` will only run while the container's primary +process (`PID 1`) is running, and will not be restarted if the container is restarted. + +If the container is paused, then the `docker exec` command will wait until the +container is unpaused, and then run. #### Examples