Docker and CI/CD · Junior · Question 13 of 75

How do you open a shell inside a running container?

Explanation

exec starts an extra process in an existing container. docker run would create a new container from an image instead. Minimal images may have sh but not bash.

Further reading

Problem with a question

Docker and CI/CD · Junior · question 13

Test yourself

Take the Docker and CI/CD · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz