Commit Graph

10 Commits

Author SHA1 Message Date
014efc77a7 Remove the os.user dependency and manually lookup /etc/passwd instead
Upstream-commit: eb38750d99d4f9706cb2abcb861c84e1d309bd40
Component: engine
2013-07-12 10:49:47 -07:00
f94dc93764 Don't remove the container= environment variable, as it is crucial for a lot of tools to detect, whether they're run inside an LXC container or not.
Upstream-commit: e5e47c98629f9e81ea24d2784e04863d614d34f5
Component: engine
2013-07-02 19:13:37 +02:00
a7d3c2e8bf Manually pass the env to docker-init instead of relying on lxc to pass it
Upstream-commit: 7b0e96f1f4639f869703ed32f885cec9b666b127
Component: engine
2013-04-16 14:32:50 -07:00
7d008a24f8 Use ip to setup the gateway in sysinit.go
ip from iproute2 replaces the legacy route tool which is often not
installed by default on recent Linux distributions.

The same patch has been done in network.go and is re-used here.
Upstream-commit: 5e1a975b48c1d4e6743f68ca770f8fe06fb32ce4
Component: engine
2013-04-10 17:40:28 -07:00
ef4eef944a Clean up 'container' environment variable injected by lxc-start
Upstream-commit: f7eaaa3adb08082089544c34439bb31b5a6f3246
Component: engine
2013-03-23 19:11:00 -07:00
4c9c80d04b 'docker run -e': set environment variables in a container
Upstream-commit: 34fbaa5f6d0d8bd31504f43db56090be6dfa9af4
Component: engine
2013-03-22 20:36:34 -07:00
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