Commit Graph

419 Commits

Author SHA1 Message Date
Kevin Greene 8444551373 Added ulimits functionality to docker compose
Signed-off-by: Kevin Greene <kevin@spantree.net>
2015-11-12 13:54:41 -05:00
Daniel Nephin 73ebd7e560 Only create the default network if at least one service needs it.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-12 13:54:41 -05:00
Daniel Nephin 36176befb0 Fix #1549 - flush after each line of logs.
Includes some refactoring of log_printer_test to support checking for flush(), and so that each test calls the unit-under-test directly, instead of through a helper function.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-12 13:54:41 -05:00
Daniel Nephin de08da278d Re-order flags in bash completion
and remove unnecessary variables from build command.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-12 13:54:41 -05:00
Adrian Budau 4c2eb17ccd Added --force-rm to compose build.
It's a flag passed to docker build that removes the intermediate
containers left behind on fail builds.

Signed-off-by: Adrian Budau <budau.adi@gmail.com>
2015-11-12 13:54:41 -05:00
Daniel Nephin 8fb44db92b Cleanup some unit tests and whitespace.
Remove some unnecessary newlines.
Remove a unittest that was attempting to test behaviour that was removed a while ago, so isn't testing anything.
Updated some unit tests to use mocks instead of a custom fake.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-12 13:54:41 -05:00
Joffrey F 666c3cb1c7 Use exit code 1 when encountering a ReadTimeout
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-11-12 13:54:40 -05:00
Daniel Nephin 886134c1f3 Recreate dependents when a dependency is created (not just when it's recreated).
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-12 13:54:40 -05:00
Daniel Nephin ba61a6c5fb Don't set the hostname to the service name with networking.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-12 13:54:40 -05:00
Daniel Nephin 3f14df374f Handle non-utf8 unicode without raising an error.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-12 13:54:40 -05:00
Daniel Nephin e6755d1e7c Use VolumeSpec instead of re-parsing the volume string.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-12 13:54:40 -05:00
Daniel Nephin c4f59e731d Make working_dir consistent in the config package.
- make it a positional arg, since it's required
- make it the first argument for all functions that require it
- remove an unnecessary one-line function that was only called in one place

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-12 13:54:39 -05:00
Daniel Nephin 805ed344c0 Refactor ServiceLoader to be immutable.
Mutable objects are harder to debug and harder to reason about. ServiceLoader was almost immutable. There was just a single function which set fields for a second function. Instead of mutating the object, we can pass those values as parameters to the next function.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-12 13:54:39 -05:00
Daniel Nephin a5959d9be2 Some minor style cleanup
- fixed a docstring to make it PEP257 compliant
- wrapped some long lines
- used a more specific error

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-12 13:54:39 -05:00
Mazz Mosley 0375dccf64 Handle non-ascii chars in volume directories
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-11-12 13:54:39 -05:00
Daniel Nephin e317d2db9d Remove service.start_container()
It has been an unnecessary wrapper around container.start() for a little while now, so we can call it directly.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-12 13:54:39 -05:00
Joffrey F 3daecfa8e4 Update service config_dict computation to include volumes_from mode
Ensure config_hash is updated when volumes_from mode is changed, and
service is recreated on next up as a result.

Signed-off-by: Joffrey F <joffrey@docker.com>
2015-11-12 13:54:39 -05:00
Aanand Prasad cf93362368 Fix parallel output
We were outputting an extra line, which in *some* cases, on *some*
terminals, was causing the output of parallel actions to get messed up.

In particular, it would happen when the terminal had just been cleared
or hadn't yet filled up with a screen's worth of text.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-11-12 13:54:39 -05:00
Daniel Nephin 23d4eda2a5 Fix service recreate when image changes to build.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-12 13:54:39 -05:00
Daniel Nephin 77ff37a853 Bump 1.5.0
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-03 12:36:30 -05:00
Daniel Nephin be6b811c4e Bump 1.5.0rc3
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-30 15:53:17 -04:00
Daniel Nephin 2f2e946907 Don't set a default network driver, let the server decide.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-30 15:36:15 -04:00
Daniel Nephin db164cefd3 Remove the duplicate 'Warning' prefix now that the logger adds the prefix.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-30 15:36:15 -04:00
Daniel Nephin 4d613d3ba7 Use colors when logging warnings or errors, so they are more obvious.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-30 15:36:15 -04:00
Joffrey F 9370cb033c Ensure network exists when calling run before up
Otherwise the daemon will error out because the network doesn't exist
yet.

Signed-off-by: Joffrey F <joffrey@docker.com>
2015-10-30 15:36:15 -04:00
Daniel Nephin f67503d9fd Logs are available for all log drivers except for none.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-29 15:01:33 -04:00
Daniel Nephin 8cc8e61474 Bump 1.5.0rc2
Signed-off-by: Daniel Nephin <dnephin@docker.com>

Fill out 1.5.0 release notes

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-10-27 19:48:54 -04:00
Mazz Mosley a772a0d7d7 Remove redundant try/except
Code cleanup. We no longer need this as the api returns a 304 for any
stopped containers, which doesn't raise an error.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-27 19:33:28 -04:00
Mazz Mosley 6f0096c87b Move rename functionality into Container
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-27 19:33:28 -04:00
Mazz Mosley d6fa8596d2 Attach to a container's log_stream before they're started
So we're not displaying output of all previous logs for a container, we attach,
if possible, to a container before the container is started.

LogPrinter checks if a container has a log_stream already attached and
print from that rather than always attempting to attach one itself.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-27 19:33:28 -04:00
Daniel Nephin a9b4fe768d Fix running one-off containers with --x-networking by disabling linking to self.
docker create fails if networking and links are used together.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-27 19:33:28 -04:00
Daniel Nephin e168fd03ca Fix unicode in environment variables for python2.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-26 13:05:41 -04:00
Daniel Nephin f5ad363143 Use inspect network to query for an existing network.
And more tests for get_network()

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-26 13:05:40 -04:00
Daniel Nephin f290faf4ba Minor refactor to use guard and replace instead of split+join
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-21 11:29:49 -04:00
Daniel Nephin 725088a18b Force windows drives to be lowercase.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-21 11:29:49 -04:00
Daniel Nephin bf672ec340 Fixes #2205 - extends must be copied from override file.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-20 11:27:11 -04:00
Mazz Mosley 0e4f9c9a66 Environment keys can contain empty values
Environment keys that contain no value, get populated with values taken
from the environment not from the build phase but from running the command `up`.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-19 15:16:19 -04:00
Mazz Mosley 5fdb75b541 Improve error message for type constraints
It was missing a space between the different types, when there
were 3 possible type values.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-19 15:16:19 -04:00
Daniel Nephin 24d4a1045a Fixes #2203 - properly validate files when multiple files are used.
Remove the single-use decorators so the functionality can be used directly as a function.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-19 15:16:19 -04:00
Daniel Nephin 514f0650b2 Give the user a better error message (without a stack trace) when there is a yaml error.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-19 12:02:40 -04:00
Cameron Eagans 6048630a11 docker-compose pull SERVICE should not pull SERVICE's dependencies
Signed-off-by: Cameron Eagans <me@cweagans.net>
2015-10-16 12:59:57 -04:00
Daniel Nephin 709bd9c363 Bump 1.5.0rc1
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-14 12:59:31 -04:00
Daniel Nephin 0409b287ad Merge pull request #2191 from dnephin/networking
Networking
2015-10-14 12:31:26 -04:00
mnowster 6b68a84b9b Merge pull request #2019 from mrfuxi/less-verbose-extends
Allow to extend service using shorthand notation. Closes #1989
2015-10-14 17:13:09 +01:00
Daniel Nephin e2f792c4f4 If -x-networking is used, set the correct API version.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-14 12:09:50 -04:00
Aanand Prasad d5f5eb1924 Enable use of Docker networking with the --x-networking flag
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-10-14 11:19:43 -04:00
Daniel Nephin b9c76dfabd Merge pull request #2181 from mnowster/2128-split-drive-not-handling-relative-paths
2128 split drive not handling relative paths
2015-10-14 11:04:42 -04:00
Mohit Soni f4efa29377 Added support for cgroup_parent
This change adds cgroup-parent support to compose project. It allows
each service to specify a 'cgroup_parent' option.

Signed-off-by: Mohit Soni <mosoni@paypal.com>
2015-10-14 15:02:42 +01:00
Karol Duleba c7ffbf97c8 Extend oneOf error handling. Issue #1989
Signed-off-by: Karol Duleba <mr.fuxi@gmail.com>
2015-10-14 14:31:35 +01:00
Mazz Mosley c1d5ecaafe Workaround splitdrive limitations
splitdrive doesn't handle relative paths, so if volume_path contains
a relative path, we handle that differently and manually set drive to ''.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-13 17:27:25 +01:00