Commit Graph

6 Commits

Author SHA1 Message Date
Solomon Hykes 6c3dcdded2 Clean up 'container' environment variable injected by lxc-start 2013-03-23 19:11:00 -07:00
Solomon Hykes e07b18d7a6 'docker run -e': set environment variables in a container 2013-03-22 20:36:34 -07:00
Solomon Hykes 53e17c0f1d Setup a predictable, repeatable environment for containers 2013-03-07 09:25:41 -08:00
Andrea Luzzardi df0c8fdac4 sysinit: Support for the -g (gateway) flag used in networking setup 2013-02-21 10:47:57 -08:00
Andrea Luzzardi 251a700785 Implemented support to run as a different user (through the -u flag) 2013-02-13 17:24:35 -08:00
Andrea Luzzardi 8a5cd74ac5 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)
2013-02-13 14:01:44 -08:00