December 08, 2017

Docker Commands: docker exec

Docker Commands: docker exec


docker exec

Run a new process in an already running container

Use docker exec to run a secondary process inside a container.

Let's say the Nginx web proxy container is running in detached (-d) mode, you can use docker exec to start another process in that container. In the example below, the process status command, ps is run inside the Nginx container.

Note: If the container is stopped, it must first be started with docker start.


Creative Commons License Licensed under a Creative Commons Attribution 4.0 International License.

No comments:

Post a Comment