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
3eafdbb01b
Connect services to networks with the 'networks' key
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-14 17:59:37 +00: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
c64af0a459
Add an acceptance test and docs for the down subcommand
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-14 11:11:08 -05:00
Jonathan Stewmon
5d8c2d3cec
add support for stop_signal to compose file
...
Signed-off-by: Jonathan Stewmon <jstewmon@rmn.com>
2016-01-12 17:21:49 -06:00
Aanand Prasad
b786b47bc8
Remove version checks from tests requiring API v1.21
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-12 21:08:28 +00: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
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
Joffrey F
b4be7b870f
Add support for declaring named volumes in compose files
...
* Bump default API version to 1.21 (required for named volume management)
* Introduce new, versioned compose file format while maintaining support
for current (legacy) format
* Test updates to reflect changes made to the internal API
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-01-05 15:09:39 -08:00
Daniel Nephin
4bf2f8c4f9
Fix lookup of linked containers for API version 1.20
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-05 15:09:39 -08: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
3bdcc9d954
Update service tests to use mounts instead of volumes
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-01-05 15:09:39 -08:00
Aanand Prasad
a2d2915a64
Merge pull request #2547 from seguins/1125-docker-compose-create
...
Add docker-compose create command.
2015-12-21 14:20:56 +00:00
Stéphane Seguin
3c76d5a467
Add docker-compose create command.
...
Closes #1125
Signed-off-by: Stéphane Seguin <stephseguin93@gmail.com>
2015-12-18 08:53:26 +01:00
Dimitar Bonev
a542041264
Added support for cpu_quota flag
...
Signed-off-by: Dimitar Bonev <dimitar.bonev@gmail.com>
2015-12-16 21:25:30 +02:00
Stéphane Seguin
999d15b225
Remove unused functions in service
...
Signed-off-by: Stéphane Seguin <stephseguin93@gmail.com>
2015-12-08 21:11:05 +01:00
Daniel Nephin
2ab3cb212a
Add integration test and docs for build with a git url.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-26 11:32:39 -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
efec2aae6c
Fixes #2008 - re-use list_or_dict schema for all the types
...
At the same time, moves extra_hosts validation to the config module.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-23 13:31:58 -05:00
Daniel Nephin
12b82a20ff
Move restart spec to the config.types module.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-23 13:31:58 -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
d1adbb9b25
Refactor parallel_execute.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-20 17:09:51 -05:00
Daniel Nephin
76f3c9c739
Merge pull request #2349 from dnephin/validate_all_files
...
Validate all files before merging them
2015-11-11 15:27:47 -05:00
Daniel Nephin
a92d86308f
Rename ServiceLoader to ServiceExtendsResolver
...
ServiceLoader has evolved to be not really all that related to "loading" a
service. It's responsibility is more to do with handling the `extends`
field, which is only part of loading. The class and its primary method
(make_service_dict()) were renamed to better reflect their responsibility.
As part of that change process_container_options() was removed from
make_service_dict() and renamed to process_service(). It contains logic for
handling the non-extends options.
This change allows us to remove the hacks from testcase.py and only call
the functions we need to format a service dict correctly for integration tests.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-11 10:58:07 -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
Daniel Nephin
ce322047a0
Move config hash tests to service_test.py
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-05 10:27:11 -05:00
Daniel Nephin
3d9e3d0877
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-03 10:17:09 -05:00
Daniel Nephin
a71d9af522
Disable a test against docker 1.8.3 because it fails due to a bug in docker engine.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-28 17:54:38 -04:00
Mazz Mosley
bee063c07d
Fix tests
...
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-27 17:12:18 +00:00
Aanand Prasad
627f1acdc4
Merge pull request #2126 from mnowster/1188-support-ro-options-in-volumes-from
...
1188 support ro options in volumes from
2015-10-07 11:57:14 +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
Daniel Nephin
e230142a25
Reduce the scope of sys.stdout patching.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-03 01:24:28 -04:00
Daniel Nephin
c37a0c38a2
Fix a test case that assumes busybox image id.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-09-22 12:28:59 -04:00
Mazz Mosley
42c890796b
Use docker.client.create_host_config
...
create_host_config from docker.utils will be deprecated so that
the new create_host_config has access to the _version so
we can ensure that network_mode only gets set to 'default' by
default if the version is high enough and won't explode.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-09-17 17:11:00 +01:00
Mazz Mosley
2f45649611
Handle invalid log_driver
...
Now docker-py isn't hardcoding a list of valid log_drivers, we
can expect an APIError in response rather than a ValueError
if we send an invalid log_driver.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-09-15 15:47:39 +01:00
Aanand Prasad
d1dd06a7e2
Update docker-py to 1.4.0
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-09-11 15:42:20 -07:00
Daniel Nephin
61415cd8bc
Fixes #1955 - Handle unexpected errors, but don't ignore background threads.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-09-11 17:41:10 -04:00
Daniel Nephin
db9f577ad6
Extract link names into a function.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-09-03 14:08:44 -04:00
Mazz Mosley
6a399a5b2f
Update tests to be compatible with validation
...
Some were missing build '.' from their dicts, others were the
incorrect type and one I've moved from integration to unit.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-09-02 15:43:52 +01:00
Daniel Nephin
235fe21fd0
Prevent flaky test by changing container names.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-31 14:57:06 -04:00
Daniel Nephin
54973e8200
Remove flake8 ignores and wrap the longest lines to 140 char.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-26 12:53:11 -04:00
Daniel Nephin
bd7c032a00
Fix service integration tests.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-25 10:48:48 -04:00
Daniel Nephin
2943ac6812
Cleanup requirements.txt so we don't have to maintain separate copies for py2 and py3.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-25 10:46:08 -04:00
funkyfuture
9aa61e596e
Run tests against Python 2.6, 2.7, 3.3, 3.4 and PyPy2
...
In particular it includes:
- some extension of CONTRIBUTING.md
- one fix for Python 2.6 in tests/integration/cli_test.py
- one fix for Python 3.3 in tests/integration/service_test.py
- removal of unused imports
Make stream_output Python 3-compatible
Signed-off-by: Frank Sachsenheim <funkyfuture@riseup.net>
2015-08-25 10:41:09 -04:00
Daniel Nephin
809443d6d0
Support python 3
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-25 10:37:29 -04:00
Daniel Nephin
59d4f304ee
Run pre-commit on all files
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-24 17:04:50 -04:00
Mazz Mosley
f4a8fda283
Handle all exceptions
...
If we get back an error that wasn't an APIError, it was causing the
thread to hang. This catch all, while I appreciate feels risky to
have a catch all, is better than not catching and silently failing,
with a never ending thread.
If something worse than an APIError has gone wrong, we want to stop
the incredible journey of what we're doing.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-17 16:31:57 +01:00
Aanand Prasad
8b5bd945d0
Interpolate environment variables
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-06 11:18:57 +01:00