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

Why does a container exit right after starting?

Explanation

A container is its main process (PID 1). A script that finishes, or a server that crashes, ends the container. Check docker logs and the exit code in docker ps -a.

Further reading

Problem with a question

Docker and CI/CD · Junior · question 14

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