Commit Graph

21804 Commits

Author SHA1 Message Date
d08749138a Merge pull request #4085 from shykes/separate-config-hostconfig
Move canonical run configuration objects to a sub-package
Upstream-commit: d3c084beeec1b89940f304b3d123f5f810fe5ff8
Component: engine
2014-02-11 23:37:40 -05:00
138c42e7c0 Merge pull request #4089 from shykes/autopull-useless-code
Remove useless code in client implementation of 'run'.
Upstream-commit: 19755bcdae9cb1b8ce28d068cf83d16fcf7273e9
Component: engine
2014-02-11 23:23:12 -05: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
15bba51638 Remove useless code in client implementation of 'run'.
This facilitates refactoring commands.go.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: e3140e1e69b24f32ffcc2dd94b7d82ad9305a7bc
Component: engine
2014-02-11 20:16:58 -08:00
5c232a828b Merge pull request #4074 from shykes/separate-version
Move docker version introspection to a sub-package.
Upstream-commit: 9a9690360c9b013f3962bee74c18397bd411cc6b
Component: engine
2014-02-11 20:16:00 -08:00
4780092833 Merge pull request #4083 from shykes/api-validate-host
Move api-specific code to the api package
Upstream-commit: 28e4de8bfacc610bfa3a0e15cc633e406ea9e9f5
Component: engine
2014-02-11 20:10:35 -08:00
9d4f77997b Merge pull request #76 from tianon/fix-broken-eagle-tests
Fix the tests, too
Upstream-commit: 0dc9c5531eaefbf00c1ebea28465fc4c74cf2118
Component: engine
2014-02-11 20:07:47 -08:00
faccead7fb pkg/opts: a collection of custom value parsers implementing flag.Value
This facilitates the refactoring of commands.go.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: e6e320acc757f22e113da755293583402c6c1e7c
Component: engine
2014-02-11 19:59:52 -08:00
cbe391a3ed Move api-specific code to the api package
This facilitates the refactoring of commands.go.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: e08a1c53aa5a19a17d40d41accbab040611c4411
Component: engine
2014-02-11 19:59:52 -08:00
e8ca8bfeb8 Fix the tests, too
Seriously.  There's not much codebase left we haven't touched.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 0d871840b202fc31418990bbcbe0df1c4ad689fb
Component: engine
2014-02-11 19:10:23 -07:00
a5dcd8d987 Merge pull request #4079 from shykes/separate-nat
New package `nat`: utilities for manipulating the text description of network ports
Upstream-commit: 6da1e092dc222b17a296009de55d8216dfcfe612
Component: engine
2014-02-11 20:45:58 -05:00
dd7c566ac6 Merge pull request #75 from tianon/fix-my-broken-eagle
Fix the one spot I missed dockerversion
Upstream-commit: b609e28e5c7168475c09749e308c6025a715120f
Component: engine
2014-02-11 17:32:11 -08:00
2b6a0d82a2 Fix the one spot I missed dockerversion
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 7ea725fdc530e989516fae60f5dafecb139d75b8
Component: engine
2014-02-11 18:23:17 -07:00
1cb1e79554 fix underline/heading
Docker-DCO-1.1-Signed-off-by: Andy Rothfusz <github@developersupport.net> (github: metalivedev)
Upstream-commit: 6fd8e5d976e872447447d8c25d20d525305f281d
Component: engine
2014-02-11 16:53:08 -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
c691ff08d3 Merge pull request #4034 from SvenDowideit/postgres-example
rewrite the PostgreSQL example using a Dockerfile, and add details to it
Upstream-commit: e9e4b8dc15fcf01fb793cd65ebfa822420d56fe8
Component: engine
2014-02-11 16:49:22 -08:00
afbabaccff Merge pull request #4050 from SvenDowideit/put-back-LGTM
bring back the explanation of our LGTM process
Upstream-commit: 6b925a49919ae12129e915ce542c7280faf99641
Component: engine
2014-02-12 10:41:49 +10:00
11f8cb78e5 Merge pull request #74 from tianon/more-separate
Move even more stuff into dockerversion
Upstream-commit: 619ad8421611e774a851b7be81ba8ae0a31963a2
Component: engine
2014-02-11 16:37:27 -08:00
afe2170b4f rewrite the PostgreSQL example using a Dockerfile, and add details to it
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: 2ed2ba4e8caa2d70d57d124a2f3509f400d8187e
Component: engine
2014-02-12 10:30:57 +10:00
da8055c21a Merge pull request #3988 from dafyddcrosby/fix_formatting
Fix RST formatting
Upstream-commit: 73967417579a44a4597e8d3e818248f8c98a1c97
Component: engine
2014-02-11 16:30:21 -08:00
04ccad7a77 Merge pull request #4057 from SvenDowideit/add-P-docs
add a little more information about the docker run -P option
Upstream-commit: 7fe8b50e2ee9ba0b237827f95980dcf6e1a41fb4
Component: engine
2014-02-11 16:27:25 -08:00
9ed97b673b Move even more stuff into dockerversion
Also, use it in all the places. :)

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: da04f49b383c02ee28c32f948048b9e9a402bb4f
Component: engine
2014-02-11 17:26:54 -07:00
ba35f17949 Merge pull request #4054 from SvenDowideit/boot2docker-upgrade-doc
add a little info on upgrading b2d
Upstream-commit: ff2260099ab8669241e3cedd2edd3afe0fb34f4d
Component: engine
2014-02-11 16:23:11 -08:00
deaadc8b56 fix underline/heading
Upstream-commit: c76a4e34896fd0785cf982372a3713c4ef70754b
Component: engine
2014-02-11 16:19:42 -08:00
c649008597 Merge pull request #4020 from cameronboehmer/patch-1
add vm port forwarding note/example in osx install docs
Upstream-commit: 3122b4b470168ead70a84ff2594aa32c0619e08c
Component: engine
2014-02-11 16:18:54 -08:00
7abeabe543 Merge pull request #4072 from 13W/patch-1
Update remote_api_client_libraries.rst
Upstream-commit: 0bcabdbdc79472d7e6c56498c8ae06413730d270
Component: engine
2014-02-11 16:14:22 -08:00
ef486c6630 Move docker version introspection to a sub-package.
This facilitates the refactoring of commands.go.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: ae3c7dec3b075a263da8d1e1cc510275b281e799
Component: engine
2014-02-11 16:10:51 -08:00
27e1a5f0fd Merge pull request #4035 from SvenDowideit/dont-env-debian-frontend
point out that ENV DEBIAN_FRONTEND will persist, so its not recommended
Upstream-commit: 9176b6fd883158e3420777e6e2d463ddcf2005ab
Component: engine
2014-02-11 15:59:10 -08:00
231362cb9e add port forwarding notes for mac/boot2docker docs
Docker-DCO-1.1-Signed-off-by: Cameron Boehmer <cameron.boehmer@gmail.com> (github: cameronboehmer)
Upstream-commit: 49b928c0b05852b58881ce8ebdb164db92befd3a
Component: engine
2014-02-11 15:26:12 -08:00
33338e981d Update remote_api_client_libraries.rst
hello, add please my interface

Docker-DCO-1.1-Signed-off-by: Vladimir <xx@ccxx.cc> (github: 13w)
Upstream-commit: d35b03ef8db9d773937133277cc16364a551ab74
Component: engine
2014-02-12 01:09:06 +02:00
b3dbf3da06 Merge pull request #4067 from alexlarsson/fix-devmapper-race
Avoid extra mount/unmount during container registration
Upstream-commit: da3e53913388ebc89066bb5de06bcebc2e6c5854
Component: engine
2014-02-11 17:13:33 -05:00
87fd3e0884 Merge pull request #4055 from alexlarsson/remove-devmapper-dirs
devmapper: Remove directory when removing devicemapper device
Upstream-commit: a66124ec6aab77ed984896773c9d37b7b343c47f
Component: engine
2014-02-11 17:05:56 -05:00
56af3b233d Merge pull request #4049 from vieux/fix_commit
fix --run in docker commit
Upstream-commit: 2a9a83cf94b6d45604bdf75a5fe4a745960170a9
Component: engine
2014-02-11 22:33:27 +02:00
cc4cc8e5b8 Merge pull request #3990 from 1uptalent/3989-fix-textmate-syntax
Fix textmate syntax bundler organization
Upstream-commit: 029a045ef5ead0cf12f8eb62b5208456d21f70b2
Component: engine
2014-02-11 13:16:26 -07:00
750f4cb5c2 Merge pull request #4059 from alexlarsson/no-netadmin-caps
lxc: Drop NET_ADMIN capability in non-privileged containers
Upstream-commit: 3c215ba41005f225a07ebc8806216acdb746c671
Component: engine
2014-02-11 14:20:34 -05:00
c19931ad4a Avoid extra mount/unmount during container registration
Runtime.Register() called driver.Get()/Put() in order to read back the
basefs of the container. However, this is not needed, as the basefs
is read during container.Mount() anyway, and basefs is only valid
while mounted (and all current calls satisfy this).

This seems minor, but this is actually problematic, as the Get/Put
pair will create a spurious mount/unmount cycle that is not needed and
slows things down. Additionally it will create a supurious
devicemapper activate/deactivate cycle that causes races with udev as
seen in https://github.com/dotcloud/docker/issues/4036.

With this change devicemapper is now race-free, and container startup
is slightly faster.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 0c71015dcf788c5342bb9422a447b7f9ad12d43d
Component: engine
2014-02-11 18:02:30 +01: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
78f5f41e8e devmapper: Remove byHash hack
We no longer pass "pool" anywhere that uses byHash() per the last
commit, so we can now remove this hack.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 6128dcea4a9bbe808baba4e18c9c4fee3a265532
Component: engine
2014-02-11 13:02:00 +01:00
d3d8c35b41 devmapper: Fix shutdown warnings
Shutdown contains debug warnings like:

[debug] deviceset.go:699 [deviceset docker-0:33-17945897] waitRemove(/dev/mapper/docker-0:33-17945897-pool)
[debug] deviceset.go:380 libdevmapper(3): libdm-common.c:552 (-1) Device /dev/mapper/docker-0:33-17945897-pool not found

This is because shutdown is using removeDeviceAndWait() to remove the pool device and the
wait part fails because the pool is gone.

We fix this by adding a pool specific removal function which avoids all the trickiness of the
normal remove.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: eab270395e5b47b16a41c54ec6e1427f8144bffc
Component: engine
2014-02-11 12:47:59 +01:00
ad55909560 Merge branch 'add-netlink-functions' of github.com:crosbymichael/docker into add-netlink-functions
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 34f5d94b2cfb0a5401b31f3b669ae6579d8126a8
Component: engine
2014-02-11 03:33:18 -08:00
40c8407540 Merge pull request #5 from tianon/null-terminators-are-important
Add comment clarifying null termination
Upstream-commit: 2205707084c7cc5d2422a0b03e97cbf8632039d5
Component: engine
2014-02-11 12:33:07 -05:00
3f55cc6f41 Add comment clarifying null termination
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: c626349f651a660302f64101055d65dc6e990307
Component: engine
2014-02-11 10:32:31 -07:00
6d92748c6f Exec out to ip right now for creating the veth pair
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 27ed9a9f98750ab666d6221553b6f4ea59d396b8
Component: engine
2014-02-11 03:32:35 -08:00
d33fce79f6 add a little more information about the docker run -P option
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: b2146cb0e7a23553d1520ed87837a1b5455c9130
Component: engine
2014-02-11 20:34:26 +10:00
96a42d5055 lxc: Drop NET_ADMIN capability in non-privileged containers
With this capability set the container can e.g. change the ip address
of his devices to that of another container on the docker0 bridge. In
a quick test I was able to listen to a port on a different ip than the
one docker assigned me, but was not able to hijack an open port
redirection that another container had open. Maybe its possible with
some more knowledge of networking though.

Anyway, network setup is meant to be handled by docker, not the apps,
so I believe denying this is generally in the spirit of docker, and
it closes down potential security issues.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 02fddffd51da782f912e2709ea814c330269515b
Component: engine
2014-02-11 11:17:34 +01:00
9ca9fdc33f devicemapper: Fix tests on fedora
If /dev/loop-control exists on the system running the test then
ioctlLoopCtlGetFree() will be called, but if not it won't.  It does
not exist in the standard docker build environment, so the tests
currently require this to not be called. This makes it instead
optional, allowing the tests to run on e.g. Fedora.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: eb4578daee98561b16d11d2978b5f5e297d903e8
Component: engine
2014-02-11 09:42:34 +01:00
abb4de8546 devmapper: Remove directory when removing devicemapper device
We're currently leaving around lots of empty directories in
/var/lib/docker/devicemapper/mnt/ for removed images and containers.
Fix this by removing the directory when the device is removed.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 2343fe44533f19ebae5e6127f4a2a19d1d8773fa
Component: engine
2014-02-11 09:40:13 +01:00
c0caaa92a3 Add more netlink functions for set ns by fd and bring iface down
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: f9cd1be6ffbda85f20cc7926274fab7484a19823
Component: engine
2014-02-10 22:32:07 -08:00
71b22701b5 add a little info on upgrading
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
Upstream-commit: 82863aecab824118e223b53fed905ed5fd9182bb
Component: engine
2014-02-11 14:58:42 +10:00
11beb9de93 point out that ENV DEBIAN_FRONTEND will persist, so its not recommended
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Upstream-commit: c4b9e1c9add2ab3c97cc89c8f6b12b83750cea1d
Component: engine
2014-02-11 13:16:54 +10:00