Commit Graph

6229 Commits

Author SHA1 Message Date
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
78155d5455 Merge pull request #4151 from crosbymichael/improve-404-client-message
Improve error message for 404 returned by daemon
Upstream-commit: 6dd1bb9eb08dc144bc172b0052df7c3904896e56
Component: engine
2014-02-14 11:57:56 -08:00
c4982cc052 Improve error message for 404 returned by daemon
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 190504472b4598eff7d7f6f53df4f813975ff5bb
Component: engine
2014-02-14 11:56:52 -08:00
677b80e93f Merge pull request #4010 from tianon/iceweasel
Swap Firefox to Iceweasel so that the Desktop Integration example is simplified and easier to understand
Upstream-commit: 23aec9d7fcaa72db026c042046102b381e2e9d27
Component: engine
2014-02-14 21:38:40 +02:00
5d33a898dd Merge pull request #4146 from alexlarsson/clean-up-archive-closing
Clean up archive closing
Upstream-commit: d3a2c15a5d0352a4aca68511d9a92c16c711cd3e
Component: engine
2014-02-14 13:48:26 -05:00
13aaf53921 Drop EofReader
This is not used any more

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: d8c888b3f85a99e9f94348bb71a852b59162464a
Component: engine
2014-02-14 13:46:21 +01: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
12b909af88 archive.TarFilter() - properly close readers
CompressStream() now always returns a stream that is closable, and it never
closes the underlying writer. TarFilter() makes sure the decompressed stream
is closed at the and, as well as the PipeWriter.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 804690bd07dcc1da6d0707d081e40ec9a189a3b6
Component: engine
2014-02-14 12:56:55 +01:00
77b539f03c archive: Close decompressed streams
Various kinds of decompressed streams are really ReadClosers. For instance
gzip.NewReader() is, and the one returned from CmdStream is changed to be
because it returns a PipeReader which is a ReadCloser.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 0d9213f859e00459e9efee2c5164417c94d66d2f
Component: engine
2014-02-14 12:56:55 +01:00
1b472eb342 Merge pull request #4123 from tianon/darwin-shasum
Add shasum fallback to hack/make/dynbinary for Darwin
Upstream-commit: 32535e0b826a68973f59c4529418614453819750
Component: engine
2014-02-13 21:20:49 -07:00
f55687f256 Merge pull request #4135 from creack/console_support
Mount-bind the PTY as container console - allow for tmux/screen to run
Upstream-commit: 7aff7cc4bbc0e78c72e77429a79c32a7e7cfc0dc
Component: engine
2014-02-14 03:47:33 +02:00
fe6b466dfb Merge pull request #4134 from crosbymichael/fix-add-magic-regression
Fix regression with ADD of tar files
Upstream-commit: 1b8ec8ff1db1ddfd015b7079e39270672692fc70
Component: engine
2014-02-14 03:43:39 +02:00
308d858c86 Merge pull request #4128 from vieux/fix_header_content-type_api
Fix header content type api
Upstream-commit: 968f4800b51feb62916d1df83c5fbf17368ee6e1
Component: engine
2014-02-13 20:29:09 -05: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
20b4cea323 Fix regression with ADD of tar files
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: cad7f7ee5002206511daee4a29f399e6665f5fab
Component: engine
2014-02-13 17:18:38 -08:00
8326694294 Merge pull request #4120 from apocas/master
Image tag endpoint HTTP code typo
Upstream-commit: a4d1da709eae456888a3bdc35cd7a04a06ead7cb
Component: engine
2014-02-13 15:49:45 -08:00
8158393ebb Merge pull request #4093 from stpierre/mkimage-yum
Fix bogus variable reference in mkimage-yum.sh
Upstream-commit: cc144418456d9c93b80e291e3f24750a41658665
Component: engine
2014-02-13 15:28:47 -07:00
a3e904b8c7 Merge pull request #4125 from maxamillion/maxamillion/add_redhat_sysvinit
Remove unneeded sysctl changes in sysvinit-redhat init script
Upstream-commit: 8d2a2ed457346cd4156cf71b87a06e38536eaeb6
Component: engine
2014-02-13 12:53:53 -07:00
3670248b8d Merge pull request #4108 from unclejack/remove_default_tcp_bind_address
disallow tcp:// from defaulting to 127.0.0.1:4243
Upstream-commit: 6cb0a7e04e23ea6bc8694a6a7489ce226e01151e
Component: engine
2014-02-13 11:44:31 -08:00
6ca6193a8d fix content-type for legacy
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 0b403b35318a68d848bd9d7cddcf850d2fa7bfa7
Component: engine
2014-02-13 19:24:40 +00:00
1395c9829d fix content-type for job.Stdout.Add
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 4611a6bdd3270e4a404cae2d23c54dd94521c4ae
Component: engine
2014-02-13 19:21:27 +00:00
c0c4c69b1a Merge pull request #4062 from alexlarsson/clean-shutdown
devmapper: Fix shutdown warnings
Upstream-commit: 9997d0c9ed031465b7bc6e4df6f62bcac3758305
Component: engine
2014-02-13 10:45:03 -08:00
83b45e3c01 Merge pull request #4103 from vieux/add_error_build-rm
add error to docker build --rm
Upstream-commit: 6f10f33387becb3a8470f9f65706d0df919b7e9b
Component: engine
2014-02-13 10:35:55 -08:00
f734c53533 remove unneeded sysctl changes in sysvinit-redhat init script
Docker-DCO-1.1-Signed-off-by: Adam Miller <admiller@redhat.com> (github: maxamillion)
Upstream-commit: 4317011e21b4e4025a9c92c7dc255fbf62af573a
Component: engine
2014-02-13 12:11:38 -06:00
9d6155e45c Image tag endpoint doc typo.
Docker-DCO-1.1-Signed-off-by: Pedro Dias <petermdias@gmail.com> (github: apocas)
Upstream-commit: 3417dd4b3bef88d4da0deac520bbf150ba9c183b
Component: engine
2014-02-13 18:11:07 +00:00
b26dffeb65 Merge pull request #4096 from alexlarsson/fix-devmapper-race-2
Avoid extra mount/unmount during build
Upstream-commit: 3f1e6b63682b54bc245e805a0ee5d6422203fd45
Component: engine
2014-02-13 12:53:29 -05:00
173cbcacdb Add shasum fallback to hack/make/dynbinary for Darwin (where sha1sum is not available)
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: c7840f522c37d2c964e442c5acac745f702b8801
Component: engine
2014-02-13 10:27:45 -07:00
1e6f0f8de2 Merge pull request #4043 from tianon/hack-git-detection-and-use
Add better ".git" detection and use
Upstream-commit: f794fbc2306e633916b7f000d441d234e198fc24
Component: engine
2014-02-13 09:56:14 -07:00
3c5478c15e Merge pull request #4056 from alexlarsson/fix-devmapper-test
devicemapper: Fix tests on fedora
Upstream-commit: 47df7a360ad10660639af4bef32afaa29b16ee1c
Component: engine
2014-02-13 15:06:50 +02: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
171ba8d692 disallow tcp:// from defaulting to 127.0.0.1:4243
This stops docker from accepting tcp:// as a valid bind address.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 31dde3ea05e1cf4c1f45083c1b6129e8c2a362df
Component: engine
2014-02-13 13:54:37 +02:00
93967c393a Merge pull request #4111 from merriam/patch-4
Minor error in example code (resubmit #4109)
Upstream-commit: cddea301ab4a4d5ba32c1d1bb22f029fcf1a8edd
Component: engine
2014-02-12 18:34:17 -08:00
52f3c9ec6e Merge pull request #4112 from merriam/patch-3
(resubmit #4110) Add notes about OS/X and remote daemons 
Upstream-commit: 9d7515545944b294daae3883eceb75c53fc1b783
Component: engine
2014-02-12 18:33:11 -08:00
60f7a02d07 Minor error in example code (resubmit #4109)
Docker-DCO-1.1-Signed-off-by: Charles Merriam <charles.merriam@gmail.com> (github: merriam)
Upstream-commit: ba650e05177bcc2597606b998a104a29698d5064
Component: engine
2014-02-12 18:13:46 -08:00
8934e64a02 (resubmit) Add notes about OS/X and remote daemons
Docker-DCO-1.1-Signed-off-by: Charles Merriam <charles.merriam@gmail.com> (github: merriam)
Upstream-commit: 2a17bdce9e6e25e9be225fede7aac0b12729d82f
Component: engine
2014-02-12 18:11:01 -08:00
9cd54a87e2 Merge pull request #4090 from SvenDowideit/add-install-make-git-to-devenv
tell the reader that they need git and make for this tutorial
Upstream-commit: 989fee2490b0d4ed6fd76e668ace6769f7d908ee
Component: engine
2014-02-12 15:48:39 -08:00
1e41d2ac04 add error to docekr build --rm
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: a895c7238d3f32b22989c409a5a3b09aa3463054
Component: engine
2014-02-12 23:23:42 +00:00
52e8fe9f05 Merge pull request #3947 from maxamillion/maxamillion/add_redhat_sysvinit
Add sysvinit/sysconfig files for redhat family of distros (RHEL/CentOS/SL/etc.)
Upstream-commit: e7f91a6456dd8c3bb48ac23165607057c193c49e
Component: engine
2014-02-12 11:11:42 -07:00
536d661ab7 Merge branch 'master' into maxamillion/add_redhat_sysvinit
* master: (64 commits)
  Move the canonical run configuration objects to a sub-package
  Remove useless code in client implementation of 'run'.
  pkg/opts: a collection of custom value parsers implementing flag.Value
  Move api-specific code to the api package
  Fix the tests, too
  Fix the one spot I missed dockerversion
  fix underline/heading
  New package `nat`: utilities for manipulating the text description of network ports.
  rewrite the PostgreSQL example using a Dockerfile, and add details to it
  Move even more stuff into dockerversion
  fix underline/heading
  Move docker version introspection to a sub-package.
  add port forwarding notes for mac/boot2docker docs
  Update remote_api_client_libraries.rst
  Avoid extra mount/unmount during container registration
  add a little more information about the docker run -P option
  lxc: Drop NET_ADMIN capability in non-privileged containers
  devmapper: Remove directory when removing devicemapper device
  add a little info on upgrading
  point out that ENV DEBIAN_FRONTEND will persist, so its not recommended
  ...
Upstream-commit: e36d4d88219192269599c7273bcba4f5fcf0fb4e
Component: engine
2014-02-12 12:04:02 -06:00
b2a134f727 Added sysvinit/sysconfig files for redhat family of distros (RHEL/CentOS/SL/etc.)
Docker-DCO-1.1-Signed-off-by: Adam Miller <admiller@redhat.com> (github: maxamillion)
Upstream-commit: 2222cba5acd3fe663d492d7bc3fd4787d4c9869f
Component: engine
2014-02-12 12:03:32 -06:00
22e2031a29 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)
Upstream-commit: 59347fa66dfdd059c270a5f72e24320b4d0203ea
Component: engine
2014-02-12 16:02:53 +01:00
8f6a38f17a 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)
Upstream-commit: 85263cdee894d1f1e3bca21a8d18264ef530c4d5
Component: engine
2014-02-12 08:02:36 -05:00
3648d21c65 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)
Upstream-commit: d9f215eb2a48e6e836af9cc4015c73f17dc5be9e
Component: engine
2014-02-12 16:30:18 +10:00
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