Daniel Nephin
4053adc7d3
Add an integration test for secrets using bind mounts.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-31 09:53:16 -05:00
Joffrey F
9a0962dacb
Merge pull request #4361 from shin-/4348-serialize-ext-volumes
...
Remove external_name from volume def in config output
2017-01-19 17:41:08 -08:00
Joffrey F
d83d31889e
Remove external_name from volume def in config output
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-19 16:05:13 -08:00
Joffrey F
5c2165eaaf
Fix volume definition in v3 schema
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-19 15:41:31 -08:00
Aanand Prasad
716a6baa59
Implement 'healthcheck' option
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-18 14:47:02 +00:00
Aanand Prasad
d717c88b6e
Support version 3.0 of the Compose file format
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-16 16:07:02 +00:00
Joffrey F
14716bc2da
Merge branch 'master' of https://github.com/dbdd4us/compose into dbdd4us-master
2016-10-17 14:09:09 -07:00
realityone
22d91f60be
fix serialize restart spec with null string
...
Signed-off-by: realityone <realityone@me.com>
2016-10-14 18:20:55 +08:00
dbdd
bdcce13f4a
add support for creating volume and network with label definition
...
Signed-off-by: dbdd <wangtong2712@gmail.com>
2016-10-12 10:35:14 +08:00
Joffrey F
53fa44c01e
Don't break when interpolating environment with unicode characters
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-20 18:05:59 -07:00
Aanand Prasad
b3a4d76d4f
Handle connection errors on project initialization
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-08-02 11:44:25 +01:00
Nikola Kovacs
958758ff6d
Remove anonymous volumes when using run --rm.
...
Named volumes will not be removed.
This is consistent with the behavior of docker run --rm.
Fixes #2419 , #3611
Signed-off-by: Nikola Kovacs <nikola.kovacs@gmail.com>
2016-07-25 11:43:30 +02:00
Aanand Prasad
593d1aeb09
Fix bugs with entrypoint/command in docker-compose run
...
- When no command is passed but `--entrypoint` is, set Cmd to `[]`
- When command is a single empty string, set Cmd to `[""]`
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-11 16:15:13 -04:00
Jonathan Giannuzzi
83f35e132b
Add support for creating internal networks
...
Signed-off-by: Jonathan Giannuzzi <jonathan@giannuzzi.be>
2016-07-11 11:34:01 +02:00
Daniel Nephin
5640bd42a8
Add an acceptance test for bundle.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-06-28 10:18:59 -04:00
Aanand Prasad
756ef14edc
Fix format of 'restart' option in 'config' output
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-04-26 19:21:03 +01:00
Aanand Prasad
6064d200f9
Fix output of 'config' for v1 files
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-04-26 19:21:03 +01:00
johnharris85
6d2805917c
Account for aliased links
...
Fix failing tests
Signed-off-by: John Harris <john@johnharris.io>
2016-04-17 15:25:06 -04:00
Aanand Prasad
7781f62ddf
Attempt to fix flaky logs test
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-04-12 12:07:13 +01:00
Joffrey F
d55fc85fea
Added default env file test.
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -07:00
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
Karol Duleba
2e7f08c2ef
Raise configuration error when trying to extend service that does not exist. Fixes #1826
...
Signed-off-by: Karol Duleba <mr.fuxi@gmail.com>
2015-08-12 22:34:25 +01:00
Aanand Prasad
ed31673069
Merge pull request #1827 from mnowster/port-ranges
...
Port ranges
2015-08-12 11:17:22 +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
Mazz Mosley
da36ee7cbc
Perform schema validation
...
Define a schema that we can pass to jsonschema to validate against the
config a user has supplied. This will help catch a wide variety of common
errors that occur.
If the config does not pass schema validation then it raises an exception
and prints out human readable reasons.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-08-07 12:06:34 +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
Mazz Mosley
c6e03d739d
Test self referencing 'file'
...
When specifying the 'file' key to a value of it's own name, test
that this works and does not cause a false positive circular reference
error.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-03 14:14:47 +01:00
Mazz Mosley
6e4a954dbd
'file' key can be omitted from extends
...
If the 'file' key is not set in the extends_options dict then we
look for the 'service' from within the same file.
Fixes this issue: https://github.com/docker/compose/issues/1237
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-07-03 11:26:30 +01: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
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
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
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
Timothy Van Heest
855855a0e6
Fix for #1350 , nonexisting build path in parent section causes extending section to fail
...
Signed-off-by: Timothy Van Heest <timothy.vanheest@gmail.com>
2015-04-27 10:55:30 -04:00
Moysés Borges
8584525e8d
Interpret 'build:' as relative to the yml file
...
* This fix introduces one side-effect: the build parameter is now
validated early, when the service dicionary is first constructed.
That leads to less scary stack traces when the path is not valid.
* The tests for the changes introduced here alter the fixtures
of those (otherwise unrelated) tests that make use of the 'build:'
parameter)
Signed-off-by: Moysés Borges Furtado <moyses.furtado@wplex.com.br>
2015-03-31 18:47:26 -03: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
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
Aanand Prasad
528bed9ef6
Fix environment resolution
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-03-13 14:22:28 +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
Aanand Prasad
bc1f6c97d8
Merge pull request #898 from aanand/support-fig-yml
...
Support fig.yml
2015-01-29 13:47:49 -05:00
Aanand Prasad
9bc7604e0e
Make sure we're testing uppercase directories properly
...
(OS X is case-sensitive so we can't have fixture dirs which are
identically named if you ignore case)
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-01-28 17:19:27 -05:00
Aanand Prasad
6c45b6ccdb
Make sure we're testing blank lines and comments in env files
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-01-28 16:18:02 -05:00
Aanand Prasad
620e29b63f
Rename binary to docker-compose and config file to docker-compose.yml
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2015-01-20 21:00:23 +00: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
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
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
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
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
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