What should be PID 1 in a container?
Submitted by Ranjith Rajaram (@rrajaram) on Friday, 3 March 2017
Crisp talk of 15 mins duration
In a traditional unix systems, PID 1 is usually the init/systemd process. When a container is started, the application becomes PID 1 in its assigned namespace. So the question that arises is ” Does it really matter which process becomes PID 1 inside a container ?”. PID 1 usually has different roles to play. This talk “What should be PID 1 in a container ?” will discuss about the problem related to process reaping and signal handling. This talk would be beneficial for developers who are planning to containerize the application. Problem related to process reaping,signal handling will be explained with a simple example.
- Quick look at the CMD directive Dockerfile [1 minute]
- Demo to visualize the problem [4 minutes]
- Discussion on Process reaping [2 minutes]
- Demo to visualize signal handling [2 minutes]
- Minimal init/systemd [1 minute]
- New feature of Docker 1.13 [1 minute]
- Systemd in action [2 minutes]
Prior knowledge of Containers would be a plus
Ranjith Rajaram works for Red Hat as a Sr. Principal Tech. Support Engineer. He has 13 years of experience in implementing Linux servers for complex workloads. Active member of Fudcon and was involved in the planning of container track for Fudcon 2015.