Commit Graph

6234 Commits

Author SHA1 Message Date
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
Sven Dowideit b2146cb0e7 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)
2014-02-11 20:34:26 +10:00
Alexander Larsson 02fddffd51 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)
2014-02-11 11:17:34 +01:00
Alexander Larsson eb4578daee 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)
2014-02-11 09:42:34 +01:00
Alexander Larsson 2343fe4453 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)
2014-02-11 09:40:13 +01:00
Sven Dowideit 82863aecab add a little info on upgrading
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
2014-02-11 14:58:42 +10:00
Sven Dowideit c4b9e1c9ad 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)
2014-02-11 13:16:54 +10:00
Sven Dowideit 5051b8610d bring back the explaination of our LGTM process
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@fosiki.com> (github: SvenDowideit)
2014-02-11 10:10:50 +10:00
Victor Vieux 5d29749e9d fix --run in docker commit
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
2014-02-10 23:52:15 +00:00
Andy Rothfusz 2975ba6f73 Merge pull request #4019 from ostezer/fix-installation-windows-doc-title
docs: Installation Instruction Title & Description Fixes
2014-02-10 15:26:32 -08:00
Victor Vieux 2dcb48af0f Merge pull request #3524 from tianon/supplementary-groups
Add supplementary groups lookup in sysinit
2014-02-10 14:42:14 -08:00
Victor Vieux 036900a63a Merge pull request #3871 from jdef/patch-1
Update lxc_template.go
2014-02-10 14:38:39 -08:00
O.S.Tezer 10d57b648f docs: Installation Instruction Title & Description Fixes
Docker-DCO-1.1-Signed-off-by: O.S. Tezer <ostezer@gmail.com> (github: ostezer)

1. All titles are listed by simple platform names apart from Windows' "Installing Docker On Windows". Changed this to "Windows" to match the rest.

2. Some articles' description (and title) information does not match the majority. Modified them to match the rest (i.e. Please note this project is currently under heavy development. It should not be used in production.)

3. Removed "Linux" from Gentoo & Ubuntu descriptions.
2014-02-10 23:34:56 +02:00
Guillaume J. Charmes 63f0bbaf14 Merge pull request #4026 from crosbymichael/fix-linking-icc
Add bidirectional iptables rule back to links
2014-02-10 13:13:28 -08:00