Commit Graph

91 Commits

Author SHA1 Message Date
Joffrey F 2cc87555cb tls_config_from_options unit tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-22 11:57:45 -07:00
Simon van der Veldt 658803edf8 Add -w or --workdir to compose run to override workdir from commandline
Signed-off-by: Simon van der Veldt <simon.vanderveldt@gmail.com>
2016-03-15 15:28:32 -04:00
Matt Daue ee136446a2 Fix #2804: Add ipv4 and ipv6 static addressing
- Added ipv4_network and ipv6_network to the networks section in the
  service section for each configured network
- Added feature documentation
- Added unit tests

Signed-off-by: Matt Daue <mattdaue@gmail.com>
2016-03-09 18:37:52 -05:00
Stéphane Seguin 9b36dc5c54 Add --tail flag as option on logs.
Closes #265
Signed-off-by: Stéphane Seguin <stephseguin93@gmail.com>
2016-03-01 20:23:46 +01:00
Stéphane Seguin 82632098a3 Add -f, --follow flag as option on logs.
Closes #2187
Signed-off-by: Stéphane Seguin <stephseguin93@gmail.com>
2016-03-01 20:23:43 +01:00
Joffrey F 825a0941f0 Network aliases are now part of the network dictionary
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-18 15:23:47 -08:00
Joffrey F 633e349ab9 Test network_aliases feature
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-18 15:23:46 -08:00
Joffrey F 367fabdbfa Bring up all dependencies when running a single service.
Added test for running a depends_on service

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-12 09:46:10 -08:00
Aanand Prasad aeef61fcd8 Make 'version' a string
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-02-02 13:58:34 +00:00
Daniel Nephin b4868d0259 Fix race condition with up and setting signal handlers.
Also print stdout on wait_for_container().

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-29 13:04:04 -05:00
Aanand Prasad a9c623fdf2 Test that net can be extended
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-25 23:55:20 +00:00
Aanand Prasad e566a4dc1c Implement network_mode in v2
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-25 23:24:55 +00:00
Aanand Prasad ee63075a34 Support links in v2 files
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-21 14:34:26 +00:00
Aanand Prasad 746033ed9d Test that you can set the default network to be external
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-19 10:57:12 +00:00
Aanand Prasad e7673bf920 Allow overriding of config for the default network
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-18 16:17:39 +00:00
Daniel Nephin 3021ee12fe Fix `config` command to print the new sections of the config
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-14 18:28:17 -05:00
Daniel Nephin 0f234154c2 Remove all non-external networks on down.
Also moves the shutdown test fixtures to be a more general v2-full fixture.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-01-14 18:28:17 -05:00
Aanand Prasad 73fbd01cfe Support the 'external' option for networks
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-14 18:00:39 +00:00
Aanand Prasad ca68c9faa4 Services can join 'bridge' or 'host'
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-14 18:00:39 +00: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 35e347cf92 Disable the use of 'net' in v2
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-14 17:59:37 +00:00
Aanand Prasad 69ed5f9c48 Specify networks in Compose file
There's not yet a proper way for services to join networks

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-14 17:59:36 +00: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
Aanand Prasad 7733600262 Merge pull request #2508 from jstewmon/stop_signal
add support for stop_signal to compose file
2016-01-14 12:46:04 +00:00
Joffrey F c260eb910b Merge pull request #2629 from dbonev/2611-support-port-range-in-compose
Port range in exposed ports
2016-01-13 13:09:22 -08:00
Aanand Prasad 3aba5bb67e Merge pull request #2620 from dbonev/2607-ulimits-not-merged-in-extended-services
Ulimits are now merged into extended services
2016-01-13 21:05:38 +00: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
Dimitar Bonev 3a46abd17f Allowed port range in exposed ports
Signed-off-by: Dimitar Bonev <dimitar.bonev@gmail.com>
2016-01-13 00:13:04 +02:00
Dimitar Bonev 2f07e2ac36 Ulimits are now merged into extended services
Signed-off-by: Dimitar Bonev <dimitar.bonev@gmail.com>
2016-01-12 23:59:23 +02:00
Aanand Prasad 70cce961a8 Don't allow links or external_links in v2 files
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-12 21:29:45 +00:00
Aanand Prasad a027a0079c Use networking for version 2 Compose files
- Remove --x-networking and --x-network-driver
- There's now no way to set a network driver - this will be added back
  with the 'networks' key

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-01-12 21:29:40 +00:00
Joffrey F ca634649bb Changed logging override test into integration test
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-01-11 16:25:19 -08:00
Joffrey F 46585fb8e1 Support legacy logging options format
Additional test for legacy compose file.

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-01-08 14:37:07 -08:00
Joffrey F 21aae13e77 Move logging config changes to v2 spec
Reorganize JSON schemas
Update fixtures
Update service validation function

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-01-08 13:21:45 -08: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 437f3f8adb Add docker-compose config subcommand.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-12-07 18:51:01 -08:00
Daniel Nephin 5e97b806d5 Fix a bug in ExtendsResolver where the service name of the extended service was wrong.
This bug can be seen by the change to the test case. When the extended service
uses a different name, the error was reported incorrectly.

By fixing this bug we can simplify self.signature and self.detect_cycles to
always use self.service_name.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-11 10:58:07 -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
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 ae47435425 Fix unicode in environment variables for python2.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-10-22 12:12:43 -04:00
Karol Duleba 91b227d133 Allow to extend service using shorthand notation. Closes #1989
Signed-off-by: Karol Duleba <mr.fuxi@gmail.com>
2015-09-24 18:01:47 +01: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
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
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
Mazz Mosley 950577d60f Split validation into fields and service
We want to give feedback to the user as soon as possible about the
validity of the config supplied for the services.

When extending a service, we can validate that the fields are
correct against our schema but we must wait until the *end* of
the extends cycle once all of the extended dicts have been merged
into the service dict, to perform the final validation check on the
config to ensure it is a complete valid service.

Doing this before that had happened resulted in false reports of
invalid config, as common config when split out, by itself, is not
a valid service but *is* valid config to be included.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-09-02 15:42:38 +01:00
Mazz Mosley 4a8b2947ca Interpolate extended config
This refactoring is now really coming together. Construction is
happening in the __init__, which is a constructor and helps
clean up the design and clarity of intent of the code. We can now
see (nearly) everything that is being constructed when a ServiceLoader
is created. It needs all of these data constructs to perform the
domain logic and actions. Which are now clearer to see and moving
more towards the principle of functions doing (mostly)one thing and
function names being more descriptive.

resolve_extends is now concerned with the resolving of extends, rather
than the construction, validation, pre processing and *then* resolving
of extends.

Happy days :)

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-09-02 15:42:38 +01:00
Mazz Mosley 36757cde1c Validate extended service against our schema
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-09-02 15:42:38 +01: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
mnowster 340eaf44fa Merge pull request #1889 from mrfuxi/1670-images-digest
Allow to specify image by digest. Fixes #1670
2015-08-20 10:55:00 +01: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