Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some details about the lifecycle of commands started with docker exec #9082

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/man/docker-exec.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down
6 changes: 5 additions & 1 deletion docs/sources/reference/commandline/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down