Docker and CI/CD · Middle · Question 6 of 75
Why can a process running as PID 1 in a container misbehave?
- 1PID 1 cannot open network sockets inside a container
- ✓Correct answer: PID 1 gets no default signal handlers and must reap zombies
- 3PID 1 is limited to a single CPU core by the kernel
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.