Commit Graph

445 Commits

Author SHA1 Message Date
28cc135001 Move current tty and pipe impl to lxc driver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: aac702727ea02b3974a2848748b0713ac583fc84
Component: engine
2014-02-21 13:27:34 -08:00
a3562ba47c Add CloseWriters back and do an interface cast
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 8e2284aaa2364a8e47a8058e65d60813f9cd5089
Component: engine
2014-02-21 12:52:18 -08:00
b0992a0e99 Move term creation into driver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 592c2f6f9a472bda227a03c819f73b8edc7c3320
Component: engine
2014-02-21 12:42:37 -08:00
a808fdbf65 Change Console to Terminal
Move creation and attach to driver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 1e742876988546efb876f67f83de6737ee5e9cf6
Component: engine
2014-02-21 12:32:14 -08:00
9de10592bc Move console into execdriver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 8c783c1c1336d8f2d1b08b9cbd8e2298d066750c
Component: engine
2014-02-21 11:47:53 -08:00
587e65afdf Merge pull request #4159 from crosbymichael/move-volumes
Move volumes out of container.go and into volumes.go
Upstream-commit: a3bc3bb8c338f3fb40202681dd8bd933851a651b
Component: engine
2014-02-17 16:43:20 -08:00
bd991a8a29 Merge pull request #4162 from crosbymichael/movelinks
Move links functionality into pkg
Upstream-commit: e9db157bee3719e9c23779446dd23f84a870c92b
Component: engine
2014-02-17 16:34:47 -08:00
de5db25585 Avoid temporarily unmounting the container when restarting it
Stopping the container will typicall cause it to unmount, to keep it mounted
over the stop/start cycle we aquire a temporary reference to it during this time.

This helps with https://github.com/dotcloud/docker/issues/4036

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: ab0f3f86c8d05aa69415e6909a88b621d5b37e81
Component: engine
2014-02-17 16:10:54 +01:00
a10cdc2a0c Move links to sub pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 147b09fae9527e760d74b5ef2f9558ee109f4009
Component: engine
2014-02-14 18:18:16 -08:00
8a2b18fccd Remove container dependency for links
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: fc952e0de94aa4283c677ce6c153b1a766db2fc0
Component: engine
2014-02-14 18:07:33 -08:00
39bda86fa5 Move volumes out of container.go and into volumes.go
This helps clean up the container file and move volumes into
one location.  We currently cannot move volumes to a sub pkg
because they depend on Container and also modify fields on the
container.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: bd54d40f68f78093d6a252e96f8d17f7021af7b5
Component: engine
2014-02-14 17:15:40 -08:00
e12f62e6df Properly close archives
All archive that are created from somewhere generally have to be closed, because
at some point there is a file or a pipe or something that backs them. So, we
make archive.Archive a ReadCloser. However, code consuming archives does not
typically close them so we add an archive.ArchiveReader and use that when we're
only reading.

We then change all the Tar/Archive places to create ReadClosers, and to properly
close them everywhere.

As an added bonus we can use ReadCloserWrapper rather than EofReader in several places,
which is good as EofReader doesn't always work right. For instance, many compression
schemes like gzip knows it is EOF before having read the EOF from the stream, so the
EofCloser never sees an EOF.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: f198ee525ad6862dce3940e08c72e0a092380a7b
Component: engine
2014-02-14 13:46:17 +01:00
3dbd63bc33 Mount-bind the PTY as container console - allow for tmux/screen to run
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
Upstream-commit: 408ea0771a9cb3046b8e484dcfefe5233fcbb27a
Component: engine
2014-02-13 17:23:09 -08:00
972ffb5ee2 Merge pull request #4073 from crosbymichael/fix-docker-cp-close
Ensure docker cp stream is closed properly
Upstream-commit: c6edac9a1a33835e7ab0ea3173877f9731ec45a5
Component: engine
2014-02-13 14:12:53 +02:00
e378922981 Move the canonical run configuration objects to a sub-package
* Config is now runconfig.Config
    * HostConfig is now runconfig.HostConfig
    * MergeConfig is now runconfig.Merge
    * CompareConfig is now runconfig.Compare
    * ParseRun is now runconfig.Parse
    * ContainerConfigFromJob is now runconfig.ContainerConfigFromJob
    * ContainerHostConfigFromJob is now runconfig.ContainerHostConfigFromJob

This facilitates refactoring commands.go and shrinks the core.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 6393c38339e11b4a099a460ecf46bb5cafc4283b
Component: engine
2014-02-11 20:18:46 -08:00
944b4ea1c7 New package nat: utilities for manipulating the text description of network ports.
This facilitates the refactoring of commands.go

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 3ecd8ff0c80c593e1874cbfa0cc2abf946eeaf66
Component: engine
2014-02-11 16:51:01 -08:00
a0e7d3fc71 Ensure docker cp stream is closes properly
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 35821ad78f4ad2b20cf839ecc5a73b44c568c5eb
Component: engine
2014-02-11 06:21:53 -08:00
eaeb410e5e New build instruction: ONBUILD defines a trigger to execute when extending an image with a new build
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 9f994c96468e2495a2dc118355b6565e7dac0f44
Component: engine
2014-02-04 01:31:19 +00:00
8f61d5e8bf Fix unmounts out of container export funcs
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 02fdc194fc726ef2ce1fa4303e121abd277f8d32
Component: engine
2014-02-03 16:14:16 -08:00
e1a338aef6 Fix port mapping unit tests
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 1d4de9ce1fe2c113cd7e9fcb6055b95c94c65b06
Component: engine
2014-01-31 12:04:44 -08:00
b6b8e6cc38 Move network aspect of links into driver as a job
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 167403988dca37060edf37abbdd28360ee0d5d4a
Component: engine
2014-01-31 12:04:44 -08:00
844634dcc8 Implement requesting the name ip
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 2df01661071e949faabf1fa9ba612c40710b686b
Component: engine
2014-01-31 12:04:44 -08:00
052a914774 Fix integration tests
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 49b9813035b3abb445ef7238f034897fa03a9652
Component: engine
2014-01-31 12:04:44 -08:00
2879fa9100 Fix sending []byte in job env
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 2d8709696c80e992a5b20ba7a00ca3268c57c11c
Component: engine
2014-01-31 12:04:44 -08:00
0b250038dd Update core calls to network drivers
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: c712e74b45005e0f38297d254fb606aa18606d11
Component: engine
2014-01-31 12:04:44 -08:00
3044e71de0 Merge pull request #3841 from alexlarsson/separate-base-fs
Separate out graphdriver mount and container root
Upstream-commit: 53ee1daa699ab28fdd37d77b2cfbb0fc14dc0fdb
Component: engine
2014-01-31 11:49:14 -08:00
deac379ef5 refactor all *FromJob functions
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 9261511aa509423432f4e22f6235719deadc0969
Component: engine
2014-01-30 20:45:32 +00:00
6d81dd5d9b Separate out graphdriver mount and container root
This separates out the directory as returned from the graphdriver (the
"base" fs) from the root filesystem of the live container. This is
necessary as the "diff" operation needs access to the base filesystem
without all the mounts that the running container needs (/.dockerinit,
volumes, etc).

We change container in the following way:

Container.RootfsPath() returns the the directory which will be used as
the root in a running container. It is always of the form
"/var/lib/docker/container/<id>/root" and is a private bind mount to
the base filesystem. It is only available while the container is running.

Container.BasefsPath() returns the raw directory from the graph driver
without the container runtime mounts. It is availible whenever the
container is mounted (in between a container.Mount()/Unmount() pair,
which are properly refcounted).

This fixes issue #3840

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: fab19d197c6cc362182f6cee4d0a6e65e799875f
Component: engine
2014-01-30 16:43:53 +01:00
c7071fbcda fix convertion issues
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 187646127fa80a5ba39a53619b410eb2a13f0ffd
Component: engine
2014-01-30 00:56:42 +00:00
b28de2eada Fix for issue #3786
This is a fix for the case that one mount is inside another mount and
docker can't then delete the resulting container.

Docker-DCO-1.1-Signed-off-by: Peter Waller <p@pwaller.net> (github: pwaller)
Upstream-commit: 32753c3d241c9238b2a34f61fd44399453d7b455
Component: engine
2014-01-27 17:31:25 +00:00
b7a9dba025 Move containers to a job
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 5ea2986ce5cfce1b86fdc92610dbc6d670691168
Component: engine
2014-01-24 16:07:42 -08:00
a56db00ab7 Merge pull request #3747 from crosbymichael/move-networking
Move IP Allocator into sub package and out of the core
Upstream-commit: 641005777aa1b27ec0eb778fa810ed8aa53bae3b
Component: engine
2014-01-23 16:43:21 -08:00
225e97e755 Merge pull request #3724 from creack/extract-lxc-phase-2
Refactor process to command
Upstream-commit: 0dd856ee7f636c82e9420ebbd9e2d0b3aeea5136
Component: engine
2014-01-23 15:28:45 -08:00
f0687486f0 Fix typo in container.go
Docker-DCO-1.1-Signed-off-by: Paul Morie <pmorie@gmail.com> (github: pmorie)
Upstream-commit: 2f57eb04102c2ef08e478d3977fc3682672473af
Component: engine
2014-01-23 18:10:33 -05:00
f755b9590d Move tests from core into ipallocator
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: fccca3542b91513dd0da73db21ffa3ced4dd9b7f
Component: engine
2014-01-23 01:31:38 -08:00
96dad4beb8 Populate command in ghost state to pass to RestoreCommand
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 8723a8a89ec7d5b2a37e0536d7aadd78e5329773
Component: engine
2014-01-22 14:05:01 -08:00
3467e8dad5 Populate Command self cointainer (toward Restore())
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
Upstream-commit: 75e0357d691499b20dc903b702bc44c444f85005
Component: engine
2014-01-22 14:04:55 -08:00
47913f96e1 Merge pull request #3073 from alexlarsson/refcount-driver-mounts
Refcount driver mounts
Upstream-commit: f61a91f50a753e0b8878675b4bab8ee4dc2a70e1
Component: engine
2014-01-22 11:42:17 -08:00
78636fd4dc Merge pull request #3682 from alexlarsson/implement-tar
Implement tar in Go
Upstream-commit: 639d2ecd4f7a86a34bdde890002129f0b22c85fa
Component: engine
2014-01-22 11:23:47 -08:00
003b985961 Fix die command when monitor returns
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 80f128a6ea2b71e2ed6838c6a913086859ed50ff
Component: engine
2014-01-21 16:18:57 -08:00
0c36be10c2 Merge pull request #3566 from tianon/fix-volume-symlinks
Fix symlink mounting issues
Upstream-commit: e56562c35e0ef39a02c171f60fccd6588edb8846
Component: engine
2014-01-21 11:37:05 -08:00
36def61b75 Remove container.EnsureMounted
This was deprecated already and all it did was call Mount().
The use of this was a bit confusing since we need to pair Mount/Unmount
calls which wasn't obvious with "EnsureMounted".

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 191aa17d16c0935a7deda03b4c3bc879f7a316eb
Component: engine
2014-01-21 11:26:11 +01:00
5e35604785 Add Put() to graphdriver API and use it
This makes all users of Put() have a corresponding call
to Get() which means we will be able to track whether
any particular ID is in use and if not unmount it.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: bcaf6c2359d83acd5da54f499e21f4a148f491c5
Component: engine
2014-01-21 11:25:37 +01:00
5b95959a09 Rename Process to Command
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
Upstream-commit: 12468f2bc8a72a6bedfd681084863ea95b48713b
Component: engine
2014-01-20 16:05:07 -08:00
5de2521000 Don't expose cgroups via the execdriver API.
Use Resources to represent container limits rather than a cgroup specific field.

Docker-DCO-1.1-Signed-off-by: Paul Nasrat <pnasrat@gmail.com> (github: pnasrat)
Upstream-commit: 71c1646ba33da9b2567ad7a2f4cda0433c9718dd
Component: engine
2014-01-20 17:06:24 -05:00
e8d9d10625 archive: Remove unused features
This simplifies that code that calls out to tar by removing support
for now unused features.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 4fb1db7f742fb34a7a06621d0698063de87a572c
Component: engine
2014-01-20 20:26:20 +01:00
c8d1294225 Extract cgroups pkg.
Initial move before enhancing cgroups package.

Docker-DCO-1.1-Signed-off-by: Paul Nasrat <pnasrat@gmail.com> (github: pnasrat)
Upstream-commit: 2553029959929184696e25ebdba4631ba7aeb8a6
Component: engine
2014-01-20 14:15:44 -05:00
20e6d0be01 Extract mount into pkg.
Mount is self contained and generic, it should be in pkg, to allow other pkg modules to use it.

Docker-DCO-1.1-Signed-off-by: Paul Nasrat <pnasrat@gmail.com> (github: pnasrat)
Upstream-commit: 2e094db6390dde57263c07665290b1477bb6df7e
Component: engine
2014-01-20 13:59:29 -05:00
70ed03954d Fix symlink mounting issues by evaluating symlinks directly on the LHS of a bind-mount -v and by FollowSymlinkInScope on the RHS just before mounting
Tested successfully with variations around mounting /var/run and /var/run/docker.sock inside a "debian" container directly at /var/run/docker.sock where /var/run is a symlink to "/run" on both the host and in the container.

Fixes #3262

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 7379a22a8d1687fc004a129ec86fd6eb01c39ede
Component: engine
2014-01-20 00:38:54 -07:00
8771a3eaee Move lxc template into lxc driver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 70a5cb95b31c7596886b7f94d292444654b9af8d
Component: engine
2014-01-17 17:42:58 -08:00