Commit Graph

4 Commits

Author SHA1 Message Date
5aae786a89 Setup a predictable, repeatable environment for containers
Upstream-commit: fb350e0c7705850cc78e1dc1dc63b56aca06c3cc
Component: engine
2013-03-07 09:25:41 -08:00
c17cf0dd79 sysinit: Support for the -g (gateway) flag used in networking setup
Upstream-commit: b9b66d0e1b70cd0475d6fbba33eba5632f852dde
Component: engine
2013-02-21 10:47:57 -08:00
aaedaa2b20 Implemented support to run as a different user (through the -u flag)
Upstream-commit: 6de3e8a22dfa736f88c0477392474d73f7bed3c5
Component: engine
2013-02-13 17:24:35 -08:00
22a81ca759 Implemented a self-injecting process wrapper that runs inside the container
- 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
2013-02-13 14:01:44 -08:00