Commit Graph

26 Commits

Author SHA1 Message Date
Andrea Luzzardi b5ab1c3eed Basic networking support with hardcoded addresses. Work in progress. 2013-02-21 10:47:57 -08:00
Andrea Luzzardi 8da8bea279 Fixed a bug preventing proper reattachment to stdin upon container restart 2013-02-13 19:05:57 -08:00
Andrea Luzzardi 7489e6a97a Generate LXC config upon start rather than at container creation 2013-02-13 18:14:46 -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
Andrea Luzzardi 12b87161ce Container: Improved pseudo-terminal support 2013-01-29 15:51:21 -08:00
Andrea Luzzardi f47cec5457 go fmt 2013-01-29 13:50:27 -08:00
Solomon Hykes e1c96499f6 List containers ordered by creation time 2013-01-29 03:24:31 -08:00
Solomon Hykes f9fa5f3de8 'docker run -i' optionally opens stdin. 'docker attach' attaches to a running container (including stdin). 'docker run -t' allocates a tty (still buggy) 2013-01-28 17:50:12 -08:00
Andrea Luzzardi 252f3f299f go fmt 2013-01-28 14:30:05 -08:00
Solomon Hykes 4c36cafeb2 Experimenting with a UI which differentiates images and containers 2013-01-27 15:42:42 -08:00
Solomon Hykes 6a03ad5a8a Fixed a bug which caused Container.Start() to fail when the rootfs was already mounted. 2013-01-27 01:06:02 -08:00
Solomon Hykes f5096e1ca9 Create empty mountpoints (./rw and ./rootfs) every time we create or load a container 2013-01-27 00:49:09 -08:00
Solomon Hykes f3884d35b9 Plugged 4 more commands into the real backend: 'diff', 'reset', 'run', 'stop'. 'run' actually runs the process, but doesn't capture outptu properly, and encounters mount issues 2013-01-26 15:56:42 -08:00
Solomon Hykes c496862f7c Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-01-25 18:02:56 -08:00
Andrea Luzzardi d832df3f65 Fixed a bug preventing containers from running after being restored 2013-01-25 16:20:34 -08:00
Solomon Hykes 154b2c3218 Merge branch 'master' of ssh://github.com/dotcloud/docker 2013-01-25 15:42:43 -08:00
Andrea Luzzardi 3d7fe92024 container: Fixed a bunch of race conditions by getting rid of lxc-wait. 2013-01-25 15:36:47 -08:00
Solomon Hykes e7e6d0c575 Container.SetUserData() and GetUserData(): attach optional user data to a container 2013-01-25 14:39:02 -08:00
Andrea Luzzardi 1a65969e9a Docker: Fixed an issue with container unmarshaling which prevented
docker.restore() to work properly.
2013-01-25 14:09:21 -08:00
Andrea Luzzardi d76cdea5bf Fixed lxc-wait race condition. Added unit test to try running multiple
containers in parallel.
2013-01-22 17:30:09 -08:00
Andrea Luzzardi 8bdb36c7a4 Restart() implementation 2013-01-22 15:03:40 -08:00
Andrea Luzzardi aa3645cbe7 Container: Better serialization/reloading support 2013-01-22 11:13:22 -08:00
Andrea Luzzardi 9d28066178 container.Name -> container.Id 2013-01-21 18:39:52 -08:00
Andrea Luzzardi 910340e533 Docker: Clean shutdown of containers.
Stop() will send a SIGTERM to the init process of the container and give it 10 seconds to shutdown properly.
After the timeout is reached, the process will be force killed (SIGKILL).
Also available is Kill() which kills the process on the spot.
2013-01-21 18:03:23 -08:00
Andrea Luzzardi 70e2b10ccf Initial commit 2013-01-18 16:13:39 -08:00