Garrett Heel
9cfa71ceee
Add support for build arguments
...
Allows 'build' configuration option to be specified as an
object and adds support for build args.
Signed-off-by: Garrett Heel <garrettheel@gmail.com>
2016-01-14 12:14:56 -08:00
Aanand Prasad
8fca4f1628
Merge pull request #2649 from dnephin/make_volumes_from_more_explicit
...
Make volumes from more explicit in V2 config format
2016-01-14 17:15:27 +00:00
Daniel Nephin
b76dc1e05e
Require volumes_from a container to be explicit in V2 config.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-14 11:45:16 -05:00
Daniel Nephin
c8ed156806
Adding docker-compose down
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-14 10:59:53 -05:00
Daniel Nephin
e98ab0e534
Allow both image and build together.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-12 14:10:00 -05:00
Aanand Prasad
52e50a9d9a
Merge pull request #2626 from shin-/dbonev-2503-move-logging-config-under-separate-key
...
Move logging config under separate key in v2 compose files
2016-01-12 15:21:10 +00:00
Daniel Nephin
fc57fc1dc1
Merge pull request #2609 from dnephin/dont_warn_on_container_volume
...
Don't warn when the container volume is a compose option
2016-01-08 17:18:02 -05:00
Dimitar Bonev
ed5f7bd394
log_driver and log_opt moved to logging key.
...
Signed-off-by: Dimitar Bonev <dimitar.bonev@gmail.com>
2016-01-08 01:54:45 +02:00
Daniel Nephin
97fe2ee40c
Don't preserve host volumes on container recreate.
...
Fixes a regression after the API changed to use Mounts.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-05 15:09:39 -08:00
Joffrey F
afab5c76ea
Update service volume tests to use mounts key
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-01-05 15:09:39 -08:00
Daniel Nephin
ad9011ed96
Don't warn when the container volume is specified as a compose option.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-05 17:30:27 -05:00
Aanand Prasad
cfb1b37da2
Merge pull request #2405 from dnephin/move_all_validation_to_config
...
Move all validation to config
2015-11-25 15:16:21 +00:00
Daniel Nephin
e40670207f
Add missing assert and autospec.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-24 10:42:25 -05:00
Daniel Nephin
533f33271a
Move service sorting to config package.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-23 13:33:00 -05:00
Daniel Nephin
dac75b07dc
Move volume parsing to config.types module
...
This removes the last of the old service.ConfigError
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-23 13:33:00 -05:00
Daniel Nephin
068edfa313
Move parsing of volumes_from to the last step of config parsing.
...
Includes creating a new compose.config.types module for all the domain objects.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-23 13:31:58 -05:00
Daniel Nephin
c9ca5e86b0
Remove project name validation
...
project name is already normalized to a valid name before creating a service.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-23 13:30:54 -05:00
Daniel Nephin
e1308a8329
Fix extra warnings on masked volumes.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-13 10:49:17 -05:00
Aanand Prasad
2063b39868
Merge pull request #2336 from dnephin/warn_on_volume_masking
...
Add a warning when the host volume in the compose file is masked by a data volume
2015-11-11 17:21:29 +00:00
Daniel Nephin
7365a398b3
Update doc wording for ulimits.
...
and move tests to the correct module
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-10 15:03:20 -05:00
Daniel Nephin
a8ac6e6f93
Add a warning when the host volume config is being ignored.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-10 13:48:53 -05:00
Adrian Budau
c5c36d8b00
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-10 13:05:04 -05:00
Aanand Prasad
917b885a44
Merge pull request #2334 from dnephin/dont_set_hostname
...
Don't set the hostname to the service name with networking.
2015-11-10 17:34:02 +00:00
Joffrey F
774d852f93
Merge pull request #2335 from dnephin/volumes_refactoring
...
Some small refactoring around volumes
2015-11-09 14:05:52 -08:00
Joffrey F
a1e140f5a3
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-09 13:07:26 -08:00
Daniel Nephin
ec22d98377
Use VolumeSpec instead of re-parsing the volume string.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-05 18:11:56 -05:00
Daniel Nephin
3456002aef
Don't set the hostname to the service name with networking.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-05 17:50:32 -05:00
Daniel Nephin
b6b9b002e5
Merge pull request #2254 from mnowster/1756-dont-display-output-from-previous-runs
...
1756 dont display output from previous runs
2015-10-27 18:45:47 -04:00
Mazz Mosley
bee063c07d
Fix tests
...
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-27 17:12:18 +00:00
Daniel Nephin
7878d38dee
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 11:11:15 -04:00
mnowster
5d60fbe31e
Merge pull request #1659 from viranch/hostip-random-port
...
Allow scaling services that have port binding of the form `host_ip::container_port`
2015-10-23 17:11:28 +01:00
Daniel Nephin
b1f8ed84a3
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-10-20 14:23:56 -04:00
Viranch Mehta
258c8bc54d
Fix specifies_host_port() to handle port binding with host IP but no host port
...
Signed-off-by: Viranch Mehta <viranch.mehta@gmail.com>
2015-10-18 00:40:51 +05:30
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
Mazz Mosley
ca36628a0e
Test cgroup_parent option is being sent.
...
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-14 15:02:42 +01: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
Mazz Mosley
f9028703f4
Pick the first container
...
Rather than inefficiently looping through all the containers that a
service has and overriding each volumes_from value, pick the first
one and return that.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-07 11:27:13 +01:00
Mazz Mosley
467c731869
address PR feedback
...
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-07 11:27:13 +01:00
Vincent Demeester
5b55a08846
Add support for ro option in volumes_from
...
Fixes #1188
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-10-06 13:12:55 +01:00
Mazz Mosley
af8032a5f4
Fix incorrect test name
...
I'd written relative, when I meant absolute. D'oh.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-02 12:01:56 +01:00
Mazz Mosley
2276326d7e
volume path compatibility with engine
...
An expanded windows path of c:\shiny\thing:\shiny:rw
needs to be changed to be linux style path, including the drive,
like /c/shiny/thing /shiny
to be mounted successfully by the engine.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-02 12:01:56 +01:00
Mazz Mosley
f4cd5b1d45
Handle windows volume paths
...
When a relative path is expanded and we're on a windows platform,
it expands to include the drive, eg C:\ , which was causing a ConfigError
as we split on ":" in parse_volume_spec and that was giving too many parts.
Use os.path.splitdrive instead of manually calculating the drive.
This should help us deal with windows drives as part of the volume
path better than us doing it manually.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-01 16:06:57 +01:00
Daniel Nephin
78c0734cbd
Disable some tests in windows for now.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-09-23 10:42:57 -04:00
Mazz Mosley
39ba2c5a7c
Fix leaky tests
...
It was mocking self.client but relying on the call to
utils.create_host_config which was not mocked. So now that function
has moved to also be on self.client we need to redefine the test
boundary, up to where we would call docker-py, not the result of
docker-py.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-09-17 17:11:00 +01:00
Mazz Mosley
6f6c04b5c9
Test what we are sending, not what we get
...
This is a unit test and we are mocking the client. The method to get
the create_config_host now lives on the client, so we mock that too.
So we can test to the boundary that the method is called with the
arguments we expect.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-09-17 17:11:00 +01:00
Daniel Nephin
187ad4ce26
Refactor network_mode logic out of Service.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-09-03 13:02:46 -04:00
Daniel Nephin
c183e52502
Fixes #1757 - include all service properties in the config_dict()
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-09-03 12:04:38 -04:00
Daniel Nephin
d264c2e33a
Resolves #1804
...
Fix mutation of service.options when a label or environment variable is specified in the config.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-27 18:05:21 -04:00
Daniel Nephin
d2718bed99
Allow setting a one-off container name
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-26 13:33:03 -04:00
Daniel Nephin
bdec7e6b52
Cleanup some test case, remove unused mock return values, and use standard single underscore for unused variable
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-26 13:32:49 -04:00