Articles → DOCKER → Docker Exec CommandDocker Exec CommandIn this article, we will discuss the docker exec command.Purpose The docker exec command executes the command in the running container.Prerequisite Before reading this article, ensure Docker is installed on your machine.Example In this example, we will create an image and a container. Once the container is created, we will execute the following command: -docker exec -it c1 shIn the above code, c1 is the name of the container. Output Click to EnlargePosted By - Karan Gupta Posted On - Monday, March 20, 2023 Updated On - Thursday, February 8, 2024 Query/Feedback Your Email Id** Subject* Query/Feedback Characters remaining 250**
docker exec -it c1 sh
Query/Feedback