Commit Graph

7111 Commits

Author SHA1 Message Date
Guillaume J. Charmes 38e5b4e70f
Simplify code + Allow more generic attr children + remove prefix
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-02-12 09:29:06 -08:00
Michael Crosby e941111f33 Merge pull request #7 from creack/implement_create_veth
Implement create veth
2014-02-12 11:37:27 -05:00
Alexander Larsson 59347fa66d Avoid extra mount/unmount during build
CmdRun() calls first run() and then wait() to wait for it to exit,
then it runs commit(). The run command will mount the container and
the container exiting will unmount it. Then the commit will
immediately mount it again to do a diff.

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.

To ensure that we only unmount once we split up run() into create()
and run() and reference the mount until after the commit().

With this change docker build on devicemapper is now race-free, and
slightly faster.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-02-12 16:02:53 +01:00
Chris St. Pierre 85263cdee8 Fix bogus variable reference in mkimage-yum.sh
Fixes this: d419da7227 (commitcomment-5344982)

Docker-DCO-1.1-Signed-off-by: Chris St. Pierre <chris.a.st.pierre@gmail.com> (github: stpierre)
2014-02-12 08:02:36 -05:00
Guillaume J. Charmes dce7b6a69c
Merge remote-tracking branch 'mike/add-netlink-functions' into implement_create_veth
Conflicts:
	pkg/netlink/netlink_linux.go

Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-02-12 04:17:12 -08:00
Guillaume J. Charmes 2d2c237f50
Implement create veth
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
2014-02-12 04:09:56 -08:00
Sven Dowideit d9f215eb2a tell the reader that they need git and make for this tutorial
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
2014-02-12 16:30:18 +10:00
Michael Crosby d3c084beee Merge pull request #4085 from shykes/separate-config-hostconfig
Move canonical run configuration objects to a sub-package
2014-02-11 23:37:40 -05:00
Michael Crosby 19755bcdae Merge pull request #4089 from shykes/autopull-useless-code
Remove useless code in client implementation of 'run'.
2014-02-11 23:23:12 -05:00
Solomon Hykes 6393c38339 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)
2014-02-11 20:18:46 -08:00
Solomon Hykes e3140e1e69 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)
2014-02-11 20:16:58 -08:00
Victor Vieux 9a9690360c Merge pull request #4074 from shykes/separate-version
Move docker version introspection to a sub-package.
2014-02-11 20:16:00 -08:00
Victor Vieux 28e4de8bfa Merge pull request #4083 from shykes/api-validate-host
Move api-specific code to the api package
2014-02-11 20:10:35 -08:00
Solomon Hykes 0dc9c5531e Merge pull request #76 from tianon/fix-broken-eagle-tests
Fix the tests, too
2014-02-11 20:07:47 -08:00
Solomon Hykes e6e320acc7 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)
2014-02-11 19:59:52 -08:00
Solomon Hykes e08a1c53aa 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)
2014-02-11 19:59:52 -08:00
Tianon Gravi 0d871840b2 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)
2014-02-11 19:10:23 -07:00
Michael Crosby 6da1e092dc Merge pull request #4079 from shykes/separate-nat
New package `nat`: utilities for manipulating the text description of network ports
2014-02-11 20:45:58 -05:00
Solomon Hykes b609e28e5c Merge pull request #75 from tianon/fix-my-broken-eagle
Fix the one spot I missed dockerversion
2014-02-11 17:32:11 -08:00
Tianon Gravi 7ea725fdc5 Fix the one spot I missed dockerversion
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-02-11 18:23:17 -07:00
Andy Rothfusz 6fd8e5d976 fix underline/heading
Docker-DCO-1.1-Signed-off-by: Andy Rothfusz <github@developersupport.net> (github: metalivedev)
2014-02-11 16:53:08 -08:00
Solomon Hykes 3ecd8ff0c8 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)
2014-02-11 16:51:01 -08:00
Andy Rothfusz e9e4b8dc15 Merge pull request #4034 from SvenDowideit/postgres-example
rewrite the PostgreSQL example using a Dockerfile, and add details to it
2014-02-11 16:49:22 -08:00
Sven Dowideit 6b925a4991 Merge pull request #4050 from SvenDowideit/put-back-LGTM
bring back the explanation of our LGTM process
2014-02-12 10:41:49 +10:00
Solomon Hykes 619ad84216 Merge pull request #74 from tianon/more-separate
Move even more stuff into dockerversion
2014-02-11 16:37:27 -08:00
Sven Dowideit 2ed2ba4e8c 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)
2014-02-12 10:30:57 +10:00
Andy Rothfusz 7396741757 Merge pull request #3988 from dafyddcrosby/fix_formatting
Fix RST formatting
2014-02-11 16:30:21 -08:00
Andy Rothfusz 7fe8b50e2e Merge pull request #4057 from SvenDowideit/add-P-docs
add a little more information about the docker run -P option
2014-02-11 16:27:25 -08:00
Tianon Gravi da04f49b38 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)
2014-02-11 17:26:54 -07:00
Andy Rothfusz ff2260099a Merge pull request #4054 from SvenDowideit/boot2docker-upgrade-doc
add a little info on upgrading b2d
2014-02-11 16:23:11 -08:00
Andy Rothfusz c76a4e3489 fix underline/heading 2014-02-11 16:19:42 -08:00
Andy Rothfusz 3122b4b470 Merge pull request #4020 from cameronboehmer/patch-1
add vm port forwarding note/example in osx install docs
2014-02-11 16:18:54 -08:00
Andy Rothfusz 0bcabdbdc7 Merge pull request #4072 from 13W/patch-1
Update remote_api_client_libraries.rst
2014-02-11 16:14:22 -08:00
Solomon Hykes ae3c7dec3b 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)
2014-02-11 16:10:51 -08:00
Andy Rothfusz 9176b6fd88 Merge pull request #4035 from SvenDowideit/dont-env-debian-frontend
point out that ENV DEBIAN_FRONTEND will persist, so its not recommended
2014-02-11 15:59:10 -08:00
Cameron Boehmer 49b928c0b0 add port forwarding notes for mac/boot2docker docs
Docker-DCO-1.1-Signed-off-by: Cameron Boehmer <cameron.boehmer@gmail.com> (github: cameronboehmer)
2014-02-11 15:26:12 -08:00
Vladimir Bulyga d35b03ef8d Update remote_api_client_libraries.rst
hello, add please my interface

Docker-DCO-1.1-Signed-off-by: Vladimir <xx@ccxx.cc> (github: 13w)
2014-02-12 01:09:06 +02:00
Michael Crosby da3e539133 Merge pull request #4067 from alexlarsson/fix-devmapper-race
Avoid extra mount/unmount during container registration
2014-02-11 17:13:33 -05:00
Michael Crosby a66124ec6a Merge pull request #4055 from alexlarsson/remove-devmapper-dirs
devmapper: Remove directory when removing devicemapper device
2014-02-11 17:05:56 -05:00
unclejack 2a9a83cf94 Merge pull request #4049 from vieux/fix_commit
fix --run in docker commit
2014-02-11 22:33:27 +02:00
Tianon Gravi 029a045ef5 Merge pull request #3990 from 1uptalent/3989-fix-textmate-syntax
Fix textmate syntax bundler organization
2014-02-11 13:16:26 -07:00
Michael Crosby 3c215ba410 Merge pull request #4059 from alexlarsson/no-netadmin-caps
lxc: Drop NET_ADMIN capability in non-privileged containers
2014-02-11 14:20:34 -05:00
Alexander Larsson 0c71015dcf 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)
2014-02-11 18:02:30 +01:00
Michael Crosby 35821ad78f Ensure docker cp stream is closes properly
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-02-11 06:21:53 -08:00
Alexander Larsson 6128dcea4a 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)
2014-02-11 13:02:00 +01:00
Alexander Larsson eab270395e 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)
2014-02-11 12:47:59 +01:00
Michael Crosby 34f5d94b2c 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)
2014-02-11 03:33:18 -08:00
Michael Crosby 2205707084 Merge pull request #5 from tianon/null-terminators-are-important
Add comment clarifying null termination
2014-02-11 12:33:07 -05:00
Tianon Gravi c626349f65 Add comment clarifying null termination
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-02-11 10:32:31 -07:00
Michael Crosby 27ed9a9f98 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)
2014-02-11 03:32:35 -08:00