22a81ca759bd2c713a63f6e07c2eda7988d55286
- Before starting the container, docker injects itself inside the container by mount binding the dockerd binary into /sbin/init - Instead of running the user process directly inside the container, we run /sbin/init targetprocess [args...] - When docker is run as /sbin/init (e.g. argv[0] == "/sbin/init"), then its own sys init code kicks in - The sys init code will be responsible for setting up the process environment prior to its execution (setuid, networking, ...). - Finally, docker's sys init will exec() the container's process, thus replacing itself with the target binary (which will be running as pid 1) Upstream-commit: 58a22942602f9035a1ed44c65ae2c501420600a3 Component: engine
Description
No description provided
Languages
Go
92%
Shell
5.5%
Dockerfile
1.1%
Go-Checksums
0.9%
Makefile
0.3%
Other
0.2%