Docker and CI/CD · Middle · Question 6 of 75

Why can a process running as PID 1 in a container misbehave?

Explanation

The kernel doesn't apply default actions for signals to PID 1, so an app without a SIGTERM handler ignores it. docker run --init or tini adds a tiny init that forwards signals and reaps children.

Further reading

Problem with a question

Docker and CI/CD · Middle · question 6

Test yourself

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

Take this quiz