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
Daniel Nephin
c64b7cbb10
Ignore errors from API about not being able to kill a container.
...
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
Daniel Nephin
73de81b51c
Upgrade tests to use new Mounts in container inspect.
...
Signed-off-by: Daniel Nephin <dnephin@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
a21f9993b3
Remove migrate-to-labels.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-27 12:04:45 -05: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
e67bc2569c
Properly resolve environment from all sources.
...
Split env resolving into two phases. The first phase is to expand the paths
of env_files, which is done before merging extends. Once all files are merged
together, the final phase is to read the env_files and use them as the base
for environment variables.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-25 11:02:20 -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
Aanand Prasad
88e9c1ccd9
Merge pull request #2438 from dnephin/fix_flaky_pull_test
...
Fix `build --pull` test flakes
2015-11-24 16:44:53 +00: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
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
Aanand Prasad
665de9a494
Merge pull request #2436 from dnephin/reduce_cyclomatic_complexity
...
Reduce cyclomatic complexity
2015-11-23 17:51:54 +00:00
Daniel Nephin
2351e11cc8
Make sure we always have the latest busybox image, so that build --pull tests don't flake.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-20 17:51:36 -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
1e8f76767f
Fix env_file and environment when used with extends.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-18 16:07:11 -05:00
Daniel Nephin
a746d673b1
Merge pull request #2350 from dnephin/remove_name_from_schema
...
Remove name field from the config schema
2015-11-11 15:43:03 -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
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
1f7faadc77
Remove name from config schema.
...
Refactors config validation of a service to use a ServiceConfig data object.
Instead of passing around a bunch of related scalars, we can use the
ServiceConfig object as a parameter to most of the service validation functions.
This allows for a fix to the config schema, where the name is a field in the
schema, but not actually in the configuration. My passing the name around as
part of the ServiceConfig object, we don't need to add it to the config options.
Fixes #2299
validate_against_service_schema() is moved from a conditional branch in
ServiceExtendsResolver() to happen as one of the last steps after all
configuration is merged. This schema only contains constraints which only need
to be true at the very end of merging.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-11 11:00:11 -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
45724fc667
Only create the default network if at least one service needs it.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-10 12:43:55 -05:00
Daniel Nephin
3474bb6cf5
Cleanup workaround in testcase.py
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-10 12:43:55 -05:00
Daniel Nephin
7c2a16234f
Recreate dependents when a dependency is created (not just when it's recreated).
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-06 12:29:52 -05:00
Daniel Nephin
8ff960afd1
Fix service recreate when image changes to build.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-05 10:27:11 -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
45635f7097
Move cli tests to a new testing package.
...
These cli tests are now a different kind of that that run the compose binary. They are not the same as integration tests that test some internal interface.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-02 19:28:58 -05:00
Daniel Nephin
8057bb3fcc
Update cli tests to use subprocess.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-02 17:35:00 -05:00
Daniel Nephin
1b5b407619
Fix networking tests to work with new API in engine rc4 ( https://github.com/docker/docker/pull/17536 )
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-02 13:40:56 -05:00
Joffrey F
072e7687ae
Integration test for run command with networking enabled
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2015-10-30 14:15:47 +01: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
Mazz Mosley
7603ebea9b
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 17:12:18 +00:00
Daniel Nephin
f7100b2ef3
Change version check from engine version to api version.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-21 15:40:50 -04:00
Daniel Nephin
0fed5e6864
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-21 13:05:14 -04: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
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
mnowster
b9252aa48e
Merge pull request #2032 from villlem/master
...
Flag to skip all pull errors when pulling images
2015-09-21 13:41:08 +01:00
Aanand Prasad
18dbe1b1c0
Merge pull request #2051 from dnephin/extend_compose_files
...
Extend compose files by allowing multiple files
2015-09-21 12:34:22 +02:00
Vojta Orgon
c9083e21c8
Flag to skip all pull errors when pulling images.
...
Signed-off-by: Vojta Orgon <villlem@gmail.com>
2015-09-21 11:59:23 +02:00
Aanand Prasad
3e58003bd3
Merge pull request #2041 from ggtools/master
...
Add new --pull option in build.
2015-09-18 16:49:05 +01:00
Daniel Nephin
39ae85db8a
Support a default docker-compose.override.yml for overrides
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-09-17 14:13:50 -04:00
Daniel Nephin
c0c9a7c1e4
Update integration tests for multiple file support
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-09-17 14:13:50 -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
Christophe Labouisse
39786d4da7
Add new --pull option in build.
...
Signed-off-by: Christophe Labouisse <christophe@labouisse.org>
2015-09-15 20:19:17 +02: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
0484e22a84
Add enum34 and use it to create a ConvergenceStrategy enum.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-09-04 10:45:53 -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
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
Aanand Prasad
6baed6c354
Merge pull request #1965 from dnephin/fix_compose_up_attach
...
Attach to all containers when no service names are specified
2015-09-02 17:37:43 -07:00
Daniel Nephin
48466d7d82
Fix #1961 - docker-compose up should attach to all containers with no service names are specified, and add tests.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-09-02 16:08:18 -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
Mazz Mosley
d31d24d19f
Work around some coupling of links, net & volume_from
...
This is minimal disruptive change I could make to ensure
the service integration tests worked, now we have some validation
happening.
There is some coupling/entanglement/assumption going on here.
Project when creating a service, using it's class method from_dicts
performs some transformations on links, net & volume_from, which
get passed on to Service when creating. Service itself, then performs
some transformation on those values. This worked fine in the tests before
because those options were merely passed on via make_service_dict.
This is no longer true with our validation in place. You can't pass to
ServiceLoader [(obj, 'string')] for links, the validation expects it to be
a list of strings. Which it would be when passed into Project.from_dicts
method.
I think the tests need some re-factoring but for now, manually deleting
keys out of the kwargs and then putting them back in for Service Creation
allows the tests to continue.
I am not super happy about this approach. Hopefully we can come back and
improve it.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-09-02 15:43:52 +01:00
Mazz Mosley
8a6061bfb9
__init__ takes service name and dict
...
Moving service name and dict out of the function make_service_dict
and into __init__. We always call make_service_dict with those so
let's put them in the initialiser. Slightly cleaner design intent.
The whole purpose of the ServiceLoader is to take a
service name&service dictionary then validate, process and return
service dictionaries ready to be created.
This is also another step towards cleaning the code up so we can
interpolate and validate an extended dictionary.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-09-02 15:42:38 +01:00
Mazz Mosley
1344533b24
filename is not optional
...
While it can be set to ultimately a value of None, when a
config file is read in from stdin, it is not optional.
We kinda make use of it's ability to be set to None in our
tests but functionally and design wise, it is required.
If filename is not set, extends does not work.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-09-02 15:42:38 +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
Aanand Prasad
ecd1cc31dc
Merge pull request #1930 from dnephin/name_one_off_containers
...
Allow setting a one-off container name
2015-08-26 19:03:00 +01: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
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
71ff872e8e
Update unit tests for stream_output to match the behaviour of a docker-py response.
...
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
Frank Sachsenheim
227584b864
Adds pause and unpause-commands
...
Signed-off-by: Frank Sachsenheim <funkyfuture@riseup.net>
2015-08-21 12:43:13 +02:00
Karol Duleba
56f03bc20a
Allow to specify image by digest. Fixes #1670
...
Signed-off-by: Karol Duleba <mr.fuxi@gmail.com>
2015-08-19 21:13:34 +01: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
Daniel Nephin
b87c09b9fc
Merge pull request #1824 from mrfuxi/run-with-ports
...
Allow manual port mapping when using "run" command
2015-08-13 08:29:25 -07:00
Karol Duleba
ff87ceabbd
Allow manual port mapping when using "run" command. Fixes #1709
...
Signed-off-by: Karol Duleba <mr.fuxi@gmail.com>
2015-08-12 18:54:42 +01:00
Aanand Prasad
ed31673069
Merge pull request #1827 from mnowster/port-ranges
...
Port ranges
2015-08-12 11:17:22 +01:00
Aanand Prasad
dfa4bf4452
Ignore containers that don't have a name
...
If a container is in the process of being removed, or removal has
failed, it can sometimes appear in the output of GET /containers/json
but not have a 'Name' key. In that case, rather than crashing, we can
ignore it.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-10 16:29:12 +01:00
Yuval Kohavi
297941e460
rebasing port range changes
...
Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
2015-08-07 16:22:39 +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
Aanand Prasad
92ef1f5702
Make compose.config a proper module
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-08-05 15:50:22 +01:00
Luke Marsden
a68ee0d9c2
Support volume_driver in compose
...
* Add support for volume_driver parameter in compose yml
* Don't expand volume host paths if a volume_driver is specified
(i.e., disable compose feature "relative to absolute path
transformation" when volume drivers are in use, since volume drivers
can use name where host path is normally specified; this is a
heuristic)
Signed-off-by: Luke Marsden <luke@clusterhq.com>
2015-07-31 15:23:15 +01:00
Aanand Prasad
27bd987f28
Add test for trailing slash volume copying bug
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-30 10:31:54 +01:00
Aanand Prasad
9768872507
Fix "Duplicate volume mount" error when config has trailing slashes
...
When an image declares a volume such as `/var/lib/mysql`, and a Compose
file has a line like `./data:/var/lib/mysql/` (note the trailing slash),
Compose creates duplicate volume binds when *recreating* the container.
(The first container is created without a hitch, but contains multiple
entries in its "Volumes" config.)
Fixed by normalizing all paths in volumes config.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-29 18:42:08 +01:00
Aanand Prasad
118a389646
Update API version to 1.19
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-29 15:44:21 +01:00
Mazz Mosley
65cc84140a
Merge pull request #1736 from aanand/deprecate-allow-insecure-ssl
...
Deprecate --allow-insecure-ssl
2015-07-23 14:09:17 +01:00
Aanand Prasad
70c7d27c4e
Merge pull request #1758 from mnowster/improve-scale-test-coverage
...
Improve scale test coverage
2015-07-23 11:07:48 +01:00
Aanand Prasad
04a773f1c8
Deprecate --allow-insecure-ssl
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-23 10:56:21 +01:00
Mazz Mosley
119901c19b
Improve test coverage for scale
...
Also includes tiny amount of code cleanup, being explicit with imports.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-23 10:55:57 +01:00
Aanand Prasad
1739448402
Don't use custom name for one-off containers
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-22 15:39:56 +01:00
Aanand Prasad
a3191ab90f
Add container_name option
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-17 15:50:09 +01:00
Aanand Prasad
ced94a3504
Make smart recreate the default
...
Add --force-recreate flag to enable the old default behaviour of
recreating everything.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-17 11:28:02 +01:00
Mazz Mosley
c7dccccd1f
Merge pull request #1704 from aanand/fix-timeout-type
...
Make sure up/restart/stop timeout is an int
2015-07-16 10:50:06 +01:00
Aanand Prasad
0c5c8d1f00
Handle case where /containers/json returns "Labels": null
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-15 17:13:33 +01:00
Aanand Prasad
ec8bf066ba
Make sure up/restart/stop timeout is an int
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-15 16:56:39 +01:00
Aanand Prasad
81707ef1ad
Merge pull request #1643 from aanand/warn-about-legacy-one-off-containers
...
Show an error on 'run' when there are legacy one-off containers
2015-07-08 14:48:03 +01:00
Aanand Prasad
531265bc84
Fix smart recreate when 'image' is changed to something nonexistent
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-07 16:01:44 +01:00
Aanand Prasad
e98caf5cf9
Show an error on 'run' when there are legacy one-off containers
...
Also warn the user about the one-off containers in the standard error
message about legacy containers.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-06 14:45:17 +01:00
Aanand Prasad
fc8f564558
Merge pull request #1632 from mnowster/extends_file_default_behaviour
...
Extends file default behaviour and fixes circular reference bug
2015-07-06 13:28:54 +01:00
Aanand Prasad
f42fd6a3ad
Merge pull request #1642 from aanand/fix-1573
...
Fix bug where duplicate container is leftover after 'up' fails
2015-07-03 16:25:53 +01:00
Mazz Mosley
317bbec98c
Move make_service_dict out of config
...
This top level function is a test helper, so I've moved it into the
config_test file and updated accordingly.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-03 15:06:53 +01:00
Aanand Prasad
0b887b841f
Stop 'rm' and 'ps' listing services not defined in the current file
...
If you have an alternate YAML file with different services defined,
containers for those services will be shown in `docker-compose ps` even
if you don't pass that file in.
Furthermore, `docker-compose rm` will claim that it's going to remove
them, but actually won't.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-03 14:34:27 +01:00
Aanand Prasad
62b47224f0
Fix bug where duplicate container is leftover after 'up' fails
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-07-03 10:46:07 +01:00
Daniel Nephin
ae96fc0071
Support reading config from stdin.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-07-02 22:16:22 -04:00
Aanand Prasad
77c939b256
Merge pull request #1142 from calou/master
...
Added support of option mac-address
2015-06-17 14:39:00 -07:00
Sébastien Gruchet
b76ac6e633
Added support to option mac-address
...
Signed-off-by: Sébastien Gruchet <gruchet@gmail.com>
Updated doc
Signed-off-by: Sébastien Gruchet <gruchet@gmail.com>
Fixed LINT errors
Signed-off-by: Sébastien Gruchet <gruchet@gmail.com>
Changed mac-address entry order in config keys
Signed-off-by: Sébastien Gruchet <gruchet@gmail.com>
Changed attributes order in docs/yml.md
Signed-off-by: Sébastien Gruchet <gruchet@gmail.com>
2015-06-17 21:28:17 +02:00
Aanand Prasad
bc14c473c9
Merge pull request #1521 from dano/validate-service-names
...
Validate that service names passed to Project.containers aren't bogus.
2015-06-16 10:45:49 -07:00
Aanand Prasad
5b2a0cc73d
Merge pull request #1406 from vdemeester/667-compose-port-scale
...
Fixing docker-compose port with scale (#667 )
2015-06-15 10:58:44 -07:00
Daniel Nephin
06db577105
Move converge() to a test module, and use a short timeout for tests.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-06-14 17:18:27 -04:00
Travis Thieman
c24d5380e6
Extend up -t to pass timeout to stop running containers
...
Signed-off-by: Travis Thieman <travis.thieman@gmail.com>
2015-06-14 16:45:28 -04:00
Daniel Nephin
60351a8e07
Speed up integration test and make cleanup easier by using labels
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-06-14 16:45:28 -04:00
Daniel Nephin
d827809ffb
Use labels to filter containers.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-06-14 16:45:28 -04:00
Vincent Demeester
a5fd91c705
Fixing docker-compose port with scale ( #667 )
...
Fixes #667 and Closes #735 (taking over it)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-06-10 23:26:33 +02:00
Aanand Prasad
4fd5d58076
Test against Docker 1.7.0 RC2
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-06-10 14:19:36 -04:00
Aanand Prasad
ff151c8ea0
Test that data volumes now survive a crash when recreating
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-06-09 13:06:09 -04:00
Dan O'Reilly
c59c9dd951
Add integration test for service name verification
...
Add a test to make sure NoSuchService is raised if
a bogus service name is given to 'docker-compose logs'.
Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
2015-06-08 17:04:42 -04:00
Aanand Prasad
db2d02dc0b
Remove Service.start_or_create_containers()
...
It's only used in a single test method.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-06-08 10:59:03 -04:00
Aanand Prasad
7d2a89427c
Merge pull request #1466 from noironetworks/changing-scale-to-warning
...
Modified scale awareness from exception to warning
2015-06-04 16:21:01 +01:00
Ben Firshman
ec437313a7
Change kill SIGINT test to use SIGSTOP
...
I think the original intention of the original test was the check that
different signals work, I think. This does this -- it sends a signal
that doesn't cause the container to stop.
Closes #759 . Replaces #1467 .
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2015-05-29 11:13:37 +01:00
André Martins
ae63d35660
Modified scale awareness from exception to warning
...
Signed-off-by: André Martins <martins@noironetworks.com>
2015-05-26 23:59:45 +01:00
Aanand Prasad
1344099e29
Merge pull request #1444 from aanand/migrate-in-dependency-order
...
Migrate containers in dependency order
2015-05-26 17:30:14 +01:00
Aanand Prasad
7da8e6be3b
Migrate containers in dependency order
...
This fixes a bug where migration would fail with an error if a
downstream container was migrated before its upstream dependencies, due
to `check_for_legacy_containers()` being implicitly called when we fetch
`links`, `volumes_from` or `net` dependencies.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-05-26 16:03:06 +01:00
Aanand Prasad
4795fd874f
Fix regression in `docker-compose up`
...
When an upstream dependency (e.g. a db) has a container but a downstream
service (e.g. a web app) doesn't, a web container is not created on
`docker-compose up`.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-05-26 16:01:05 +01:00
Aanand Prasad
0b4d9401ee
Bail out immediately if there are legacy containers
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-05-26 11:53:51 +01:00
Aanand Prasad
051f56a1e6
Fix bugs with one-off legacy containers
...
- One-off containers were included in the warning log messages, which can
make for unreadable output when there are lots (as there often are).
- Compose was attempting to recreate one-off containers as normal
containers when migrating.
Fixed by implementing the exact naming logic from before we used labels.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-05-21 18:21:49 +01:00
Aanand Prasad
b5ce23885b
Split out fetching of legacy names so we can test it
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-05-21 18:21:49 +01:00
Aanand Prasad
0fdb8bf814
Refactor migration logic
...
- Rename `migration` module to `legacy` to make its legacy-ness explicit
- Move `check_for_legacy_containers` into `legacy` module
- Fix migration test so it can be run in isolation
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-05-21 18:21:09 +01:00
Aanand Prasad
b0cb31c186
Use 'top' instead of 'sleep' as a dummy command
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-05-21 16:24:29 +01:00
Daniel Nephin
022f81711e
Fixes #1434 , Project.containers with service_names.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-05-20 20:47:34 -04:00
lsowen
ea7ee301c0
Add security_opt as a docker-compose.yml option
...
Signed-off-by: Logan Owen <lsowen@s1network.com>
2015-05-19 13:47:41 -04:00
Aanand Prasad
ef4eb66723
Implement smart recreate behind an experimental CLI flag
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-05-18 18:39:18 +01:00
Daniel Nephin
62059d55e6
Add migration warning and option to migrate to labels.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-05-18 10:55:12 -04:00
Daniel Nephin
ed50a0a3a0
Resolves #1066 , use labels to identify containers
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-05-18 10:47:26 -04:00
Daniel Nephin
28d2aff8b8
Fix teardown for integration tests.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-05-18 10:44:44 -04:00
Daniel Nephin
417d9c2d51
Use individual volumes for recreate instead of volumes_from
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-05-11 13:01:43 -04:00
delbert@umn.edu
df87bd91c8
Added devices configuration option
...
Signed-off-by: Dan Elbert <dan.elbert@gmail.com>
2015-05-11 10:50:58 -05:00
Daniel Nephin
6829efd4d3
Resolves #874 , Rename instead of use an intermediate.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-05-07 21:53:41 -04:00
Daniel Nephin
0f2f9db6d8
Merge pull request #1388 from vdemeester/1303-log-driver-support
...
Add support for log-driver as a docker-compose.yml option
2015-05-07 12:00:42 -04:00
Vincent Demeester
f626fc5ce8
Add support for log-driver in docker-compose.yml
...
Closes #1303
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-05-06 13:18:58 +02:00
CJ
b06294399a
See #1335 : Added --read-only
...
Signed-off-by: CJ <lim@chernjie.com>
2015-05-02 23:39:39 +08:00
Daniel Nephin
4bce388b51
Merge pull request #1376 from aanand/fix-build-non-ascii-filename
...
Make sure the build path we pass to docker-py is a binary string
2015-04-30 20:54:21 -04:00
Daniel Nephin
6c95eed781
Merge pull request #1269 from aanand/labels
...
Implement 'labels' option
2015-04-30 20:49:11 -04:00
Aanand Prasad
4f366d8355
Make sure the build path we pass to docker-py is a binary string
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-04-30 11:57:46 +01:00
Aanand Prasad
7e0ab0714f
Merge pull request #1344 from dnephin/fix_pull_with_sha
...
Support image with ids instead of names
2015-04-29 16:46:34 +01:00
Aanand Prasad
2e6bc078fb
Implement 'labels' option
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-04-29 16:45:18 +01:00
Daniel Nephin
3dd860f0ba
Fix #923 , support image with ids instead of names.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-04-29 10:13:18 -04:00
xuxinkun
688f82c1cf
Add cpuset config.
...
Signed-off-by: xuxinkun <xuxinkun@gmail.com>
2015-04-26 00:14:52 +08:00
CJ
25ee3f0033
Remove extra s from --add-host
...
linting...
six.string_types
list-of-strings in examples
disallow extra_hosts support for list-of-dicts
A more thorough sets of tests for extra_hosts
Provide better examples
As per @aanand's [comment](https://github.com/docker/compose/pull/1158/files#r28326312 )
I think it'd be better to check `if not isinstance(extra_hosts_line,
six.string_types)` and raise an error saying `extra_hosts_config must be
either a list of strings or a string->string mapping`. We shouldn't need
to do anything special with the list-of-dicts case.
order result to work with assert
use set() instead of sort()
Signed-off-by: CJ <lim@chernjie.com>
2015-04-24 09:21:29 +08:00
Thomas Desvenain
8098b65576
Fix when pyyaml has interpreted line as a dictionary
...
Added unit tests in build_extra_hosts + fix
Signed-off-by: CJ <lim@chernjie.com>
2015-04-24 09:21:21 +08:00
Sam Wing
fb81c37ca6
added the extra_hosts option to the yml configuration which exposes the --add-host flag from the docker client
...
Signed-off-by: Sam Wing <sampwing@gmail.com>
2015-04-23 21:54:59 +08:00
Aanand Prasad
2291fa2d45
Fix --timeout flag on restart, add tests for stop and restart
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-04-21 11:59:33 +01:00
Ben Firshman
4926f8aef6
Merge pull request #1261 from aanand/fix-vars-in-volume-paths
...
Fix vars in volume paths
2015-04-09 14:44:07 +01:00
Steven Dake
1d7247b67e
Remove stray print
...
A previous commit introduced a stray print operation. Remove it.
Signed-off-by: Steven Dake <stdake@cisco.com>
2015-04-08 12:49:37 -07:00
Aanand Prasad
fd568b389d
Fix home directory and env expansion in volume paths
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-04-07 16:23:45 +01:00
Steven Dake
94277a3eb0
Add --pid=host support
...
Allow docker-compsoe to use the docker --pid=host API available in 1.17
Signed-off-by: Steven Dake <stdake@cisco.com>
2015-04-06 12:44:35 -07:00
akoskaaa
fa2fb6bd38
[pep8] flake8 run for everything, fix items from this change
...
Signed-off-by: akoskaaa <akos.hochrein@prezi.com>
2015-03-25 23:15:34 -07:00
akoskaaa
f9ea5ecf40
[pep8] make test files and config files pep8 valid
...
Signed-off-by: akoskaaa <akos.hochrein@prezi.com>
2015-03-25 20:20:38 -07:00
Aanand Prasad
83dcceacaf
Fix regression in Dns and DnsSearch settings
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-03-24 16:17:05 -07:00
Aanand Prasad
965426e39b
Revert "Add 'labels:' config option"
...
This reverts commit 721327110d
.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-03-23 15:04:04 -07:00
Aanand Prasad
721327110d
Add 'labels:' config option
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-03-20 18:12:04 -07:00
Aanand Prasad
37efdb1f8b
Make volume host paths relative to file, merge volumes when extending
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-03-20 15:45:16 -07:00
Aanand Prasad
4c582e4352
Implement `extends`
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-03-20 15:45:16 -07:00
Aanand Prasad
eef4bc3917
Specify all HostConfig at create time
...
This is required for Swarm integration: the cluster needs to know
about config like `links` and `volumes_from` at create time so that it
can co-schedule containers.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-03-20 15:14:07 -07:00
funkyfuture
4c5a80f253
Change port in ports-composefile to 49152
...
This shall lower the propability to interfere with another service (e.g. the
WebUI of an application) that is running on the machine where tests are run.
Signed-off-by: funkyfuture <funkyfuture@riseup.net>
2015-03-17 00:21:29 +01:00
Ben Firshman
dae451019b
Merge pull request #1099 from aanand/fix-env-file-resolution
...
Fix env file resolution
2015-03-13 16:49:10 +00:00
Aanand Prasad
3c8ef6a94c
Fix Project.up() tests
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-03-13 14:51:26 +00:00
Aanand Prasad
528bed9ef6
Fix environment resolution
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-03-13 14:22:28 +00:00
Aanand Prasad
4ecf5e01ff
Extract YAML loading and parsing into config module
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-03-13 14:21:58 +00:00
Aanand Prasad
25c70c2af4
Merge pull request #1076 from gilclark/master
...
Make volumes_from and net containers first class dependencies
2015-03-13 11:46:13 +00:00
Ian VanSchooten
86b723e227
Provide user override option on command line
...
Allows overriding a user on the command line from the one specified in
the docker-compose.yml
The added tests verify that a specified user overrides a default
user in the docker-compose.yml file.
Based on commit f2f01e207b
by @chmouel
Signed-off-by: Ian VanSchooten <ian@badgelabsllc.com>
2015-03-11 00:11:31 -04:00
Gil Clark
95f4e2c7c3
Make volumes_from and net containers first class dependencies and
...
assure that starting order is correct. Added supporting unit and
integration tests as well.
Signed-off-by: Gil Clark <gilclark1@gmail.com>
2015-03-06 13:30:56 -08:00
Aanand Prasad
db3b4731cd
Merge pull request #1044 from usrenmae/py3-compat
...
Move several steps closer to python3 compatibility
2015-03-02 12:08:39 +00:00
Igor Ch
f1fc1d7a16
Move several steps closer to python3 compatibility
...
Signed-off-by: Igor Ch <usrenmae@gmail.com>
2015-02-28 23:26:20 +02:00
KingsleyKelly
fa195bc829
Add -f flag as option on rm.
...
Signed-off-by: Kingsley Kelly <kingsley.kelly@gmail.com>
2015-02-27 07:24:43 +00:00
Aanand Prasad
1476027410
Fix test for image-declared volumes
...
A stray 'fig' got lost in the merge post-rename, meaning the containers
weren't being cleaned up properly.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-01-27 14:46:58 -05:00
Aanand Prasad
2af7693e64
WIP: rename Fig to Compose
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-01-20 21:00:23 +00:00
Aanand Prasad
17a8a7be4b
(Failing) test for preservation of volumes declared in images
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-01-20 20:16:18 +00:00
Daniel Nephin
2dd1cc80ca
Revert "Merge pull request #711 from dnephin/fix_volumes_on_recreate"
...
This reverts commit 55095ef488
, reversing
changes made to 72095f54b2
.
Signed-off-by: Daniel Nephin <dnephin@yelp.com>
2015-01-20 12:03:03 -08:00
Daniel Nephin
7eb476e61d
Resolves #447 , fix volume logic for recreate container
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-01-14 16:20:59 -05:00
Daniel Nephin
26f45efea2
Remove unused intermediate_container from return value.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-01-12 22:16:54 -08:00
Christophe Labouisse
aa0c43df96
Add cpu_shares option in fig.yml
...
This options maps exactly the docker run option with the same name.
Signed-off-by: Christophe Labouisse <christophe@labouisse.org>
2015-01-11 20:10:48 +01:00
Daniel Nephin
3ee8437eaa
Fix the failing test.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-01-08 10:55:40 -05:00
Daniel Nephin
b903217a4a
Merge pull request #544 from LuminosoInsight/external-links
...
Allow links to containers outside of the project
2015-01-08 10:39:00 -05:00
Daniel Nephin
3056ae4be3
Add a no-build option to fig up, to save time when services were already freshly built.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2014-12-31 13:47:24 -05:00
Daniel Nephin
5b777ee5f1
Cleanup service unit tests and restructure some service create logic.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2014-12-31 13:39:41 -05:00
Jason Bernardino Alonso
4257707244
Accept an external_links list in the service configuration dictionary to create links to containers outside of the project
...
Signed-off-by: Jason Bernardino Alonso <jalonso@luminoso.com>
Signed-off-by: Mauricio de Abreu Antunes <mauricio.abreua@gmail.com>
2014-12-30 15:31:33 -05:00
Aanand Prasad
70c3676084
Merge pull request #763 from bfirsh/pass-through-detach-to-create-container
...
Don't attach stdin and stdout when in detach mode
2014-12-30 16:05:53 +00:00
Ben Firshman
e89826fe43
Don't attach stdin and stdout when in detach mode
...
This is primarily to make it work with Swarm, which checks that
AttachStd{in,out,err} is false when creating containers.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2014-12-30 14:13:36 +00:00
Aanand Prasad
0e172228d1
Merge pull request #485 from squebe/run-service-ports
...
Added map service ports option for run command.
2014-12-19 14:17:57 -08:00
Mohammad Salehe
5182bd0968
Add dns_search support in yml config
...
Signed-off-by: Mohammad Salehe <salehe@gmail.com>
2014-12-15 16:37:31 +03:30
Aanand Prasad
05544ce241
Stronger integration tests for volume binds
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2014-12-12 17:53:57 -08:00
Stephen Quebe
cc834aa564
Added map service ports option for run command.
...
When using the fig run command, ports defined in fig.yml can be mapped
to the host computer using the -service-ports option.
Signed-off-by: Stephen Quebe <squebe@gmail.com>
2014-12-11 20:30:38 -05:00
Ben Langfeld
98b6d7be78
Add support for 'env_file' key
...
Signed-off-by: Ben Langfeld <ben@langfeld.me>
2014-12-08 23:42:09 +00:00
Tyler Fenby
5c58180538
Add capability add/drop introduced in Docker 1.2
...
Signed-off-by: Tyler Fenby <tylerfenby@gmail.com>
2014-12-08 12:32:52 -05:00
Ben Firshman
e9d946b038
Merge pull request #594 from popox/restart-option
...
Add restart option to Fig.
2014-12-08 08:43:27 -08:00
Daniel Nephin
65ae22e79a
Merge pull request #611 from raulcd/604_support_reloading_containers
...
Add signal in the kill CLI commando to send a specific signal to the service
2014-11-13 10:28:14 -05:00
Paul B
04da6b035e
Add restart option to Fig. Related to #478
...
Signed-off-by: Paul Bonaud <paul@bonaud.fr>
2014-11-08 12:10:11 +01:00
Raúl Cumplido
9abdd337b5
Add signal in the kill CLI commando to send a specific signal to the service
...
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
2014-11-04 12:22:39 +00:00
Ben Firshman
38a3ee8d63
Use upstream dockerpty 0.3.2
...
This reverts commit 60411e9f05
.
Closes #556
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
Conflicts:
requirements.txt
setup.py
2014-11-04 10:23:42 +00:00
Michael A. Smith
782a46fd60
Fixes #602 Allowing `help $cmd` with no figfile
...
Signed-off-by: Michael A. Smith <michael@smith-li.com>
2014-11-02 06:22:16 -05:00
Aanand Prasad
60411e9f05
Vendor dockerpty at c8b493553477c9a57d163c71c97b2102f44a6ce7
...
Include TLS fixes and relative imports:
c8b4935534
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2014-10-16 16:24:39 +01:00
Aanand Prasad
b318585f3c
TLS support, with same env vars as docker client
...
Thanks to @jkingyens for the bulk of the work.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2014-10-16 10:41:26 +01:00
Ben Firshman
1820306d0a
Merge pull request #529 from chmouel/override-environement
...
Allow overriding environements on command line
2014-10-14 11:27:20 +01:00
Ben Firshman
352062c2dc
Use /bin/echo for intermediate container
...
In cases where the service is using a minimal container,
/bin/echo can be created but echo cannot.
See #517
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2014-10-10 12:24:00 +01:00
Chmouel Boudjnah
92249364b6
Allow overriding environements on command line
...
Add a new command line option -e to override environement variables when
running a service.
Signed-off-by: Chmouel Boudjnah <chmouel@chmouel.com>
2014-10-09 16:33:41 +02:00
satoru
62b9c64311
Add support for the --entrypoint option of docker run
...
Signed-off-by: Satoru Logic <satorulogic@gmail.com>
2014-10-01 09:28:28 -07:00
Aanand Prasad
ec5c864cc7
Merge pull request #460 from dnephin/fix_tests_for_docker_1.1
...
Fix test failures on docker 1.1.2
2014-09-30 17:52:38 -07:00
Aanand Prasad
537d435a28
Fix race condition in cli_test.py
...
We weren't waiting for the build to finish, causing the rest of the test
to occasionally fail when looking for the image.
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2014-09-26 11:42:16 -07:00
Aanand Prasad
d978787fcc
Merge pull request #439 from dnephin/faster_integration_tests
...
Faster integration testing
2014-09-24 17:34:52 -07:00
Ben Firshman
fc4c35e977
Merge pull request #411 from Banno/fig-pull
...
adding "fig pull [SERVICE]" to pull service images
2014-09-10 23:57:20 +01:00
Daniel Nephin
e0b0801e87
Do less work during integration testing.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2014-09-09 22:00:21 -04:00
Daniel Nephin
71e7103662
Fix some tests failing with docker 1.1.2 and add a comment to recreate_container() explaining what it does.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2014-09-09 20:59:28 -04:00
Ben Firshman
ce8ef23c09
Merge pull request #393 from marksteve/restart
...
Implement restart command (Closes #98 )
2014-09-08 17:47:08 +01:00
Daniel Nephin
7fd37c89b9
Remove fig.packages replace with real deps.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2014-09-05 11:44:49 -07:00
Daniel Nephin
c48ee5caef
Add a new fig command for retrieving the locally bound port of a service.
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2014-09-04 22:09:12 -04:00
Ben Firshman
2827786886
Merge pull request #364 from docker/non-numeric-link-alias
...
Non-numeric link alias
2014-09-04 20:39:18 +01:00
Luke Amdor
e51851c884
adding "fig pull [SERVICE]" to pull service images
...
Fixes #158
Signed-off-by: Luke Amdor <luke.amdor@gmail.com>
2014-08-15 09:24:15 -05:00
Mark Steve Samson
e224c4caa4
Add integration test for restart command
...
Signed-off-by: Mark Steve Samson <hello@marksteve.com>
2014-08-13 10:01:27 +08:00
Daniel Nephin
294453433d
Remove extra calls to docker server.
...
Fix broken integration tests
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2014-08-10 11:24:20 -04:00
Daniel Nephin
df7c2cc43f
Resolves #369 , add verbose output on --verbose flag
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2014-08-09 21:05:54 -04:00
Aanand Prasad
62a4d214e8
Default link alias which is just the service name
...
Closes #37 .
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2014-08-08 13:05:42 -07:00
Aanand Prasad
94887a28c7
Make sure we support explicit protocols in port bindings
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2014-07-24 11:48:29 -07:00
Aanand Prasad
262efce43e
Fix test regression introduced in ed80576236
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2014-07-24 11:47:39 -07:00
Mark Steve Samson
7f06d46827
Add test for building with --no-cache
...
Signed-off-by: Mark Steve Samson <hello@marksteve.com>
2014-07-22 11:40:44 +08:00
Aanand Prasad
140ced6a3b
Fix and document `dns:` option
...
Closes #240 .
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2014-07-17 18:11:50 -07:00
Ben Firshman
7fb43cc85f
Merge pull request #283 from d11wtq/feature/optional-command
...
Make fig run COMMAND parameter optional.
2014-07-14 18:33:18 +01:00
Ryan Brainard
e9c2f2c5fb
Default project_name to dirname of fig.yml
...
Signed-off-by: Ryan Brainard <brainard@heroku.com>
2014-07-12 23:38:20 -07:00
Chris Corbyn
ef2fb77c1d
Make fig run COMMAND parameter optional.
...
This behaves more like the native docker client, where the absence of a
command means docker runs the CMD in the Dockerfile. If a command is
defined in fig.yml this is used instead.
Signed-off-by: Chris Corbyn <chris@w3style.co.uk>
2014-07-12 02:30:34 +00:00
Aanand Prasad
89341013a0
Fix volumes_from container
...
Closes #311 .
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2014-07-11 16:39:23 -07:00
Ben Firshman
b573b87a92
Fix race condition in recreate containers
...
Container might have stopped between checking `is_running` and
calling `stop()`, which then threw an exception.
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2014-07-11 14:53:46 -07:00
Ryan Brainard
44a91e6ba8
Resolve environment without values to values on host
...
For parity with the Docker CLI, allow environment variables without
values to be automatically resolved to their values on the host.
Signed-off-by: Ryan Brainard <brainard@heroku.com>
Conflicts:
tests/integration/service_test.py
2014-07-11 10:18:05 -07:00
Alexey Lebedeff
d83bdd5164
Change working dir through fig.yml
...
Closes #144
Signed-off-by: Alexey Lebedeff <binarin@gmail.com>
2014-07-10 21:22:45 +04:00
Aanand Prasad
944e15fa65
Stop `fig run` starting everything when a service has no links
...
This was thanks to the semantics of project.up(), which starts everything
if you pass it an empty list of service names. (That logic should
probably be moved out to main.py.)
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2014-07-02 11:51:12 +01:00
Aanand Prasad
d04b1724ec
Merge pull request #236 from rail44/feature-support-volumes-from
...
Support volumes_from option
2014-07-02 10:48:11 +01:00
Satoshi Amemiya
e5916b2fae
Support volumes_from option
...
Signed-off-by: Satoshi Amemiya <rail.sky@gmail.com>
2014-07-02 13:27:54 +09:00
Mark Steve Samson
4f7cbc3812
Support for host address in port bindings ( Closes #267 )
2014-06-27 15:07:22 +01:00
Aanand Prasad
3c48884dbb
Update dockerpty; stub it out in tests
...
Its current behaviour occasionally causes tests to hang; until this is
resolved, we'll stub it out. We weren't testing the output of 'run'
anyhow (though we should be).
2014-06-27 14:41:36 +01:00
Ben Firshman
95aa61cfe5
Merge pull request #246 from d11wtq/feature/auto_start
...
Feature: `fig up` and `fig run` now start linked containers (closes #31 ).
2014-06-24 14:46:47 +01:00