Aanand Prasad
21f20cbc9b
Merge pull request #3449 from Andrey9kin/ready/3281
...
Fix #3281 : Unexpected result when using build args with default values
2016-06-14 08:05:07 -07:00
Joffrey F
60f7e021ad
Fix split_path_mapping behavior when mounting "/"
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-06-13 15:32:10 -07:00
Andrey Devyatkin
a67ba5536d
Fix #3281 : Unexpected result when using build args with default values
...
Fix the issue when build arg is set to None instead of empty string. Usecase:
cat docker-compose.yml
.... args:
- http_proxy
- https_proxy
- no_proxy
If http_proxy, https_proxy, no_proxy environment variables are not defined then http_proxy,
https_proxy, no_proxy build args will be set to string None which breaks all downloads
With this change undefined build args will be set to empty string instead of string None
Signed-off-by: Andrey Devyatkin <andrey.a.devyatkin@gmail.com>
2016-05-28 11:39:41 +02:00
Andrey Devyatkin
c148849f0e
Fix #3281 : Unexpected result when using build args with default values
...
Fix the issue when build arg is set to None instead of empty string. Usecase:
cat docker-compose.yml
.... args:
- http_proxy
- https_proxy
- no_proxy
If http_proxy, https_proxy, no_proxy environment variables are not defined then http_proxy,
https_proxy, no_proxy build args will be set to string None which breaks all downloads
With this change undefined build args will be set to empty string instead of string None
Signed-off-by: Andrey Devyatkin <andrey.a.devyatkin@gmail.com>
2016-05-27 20:16:52 +02:00
Joffrey F
842e372258
Eliminate duplicates when merging port mappings from config files
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-05-20 15:28:35 -07:00
Joffrey F
2b5b665d3a
Add test for path mapping with Windows containers
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-05-19 14:53:37 -07:00
Joffrey F
db0a6cf2bb
Always use the Windows version of splitdrive when parsing volume mappings
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-05-17 16:33:59 -07: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
johnharris85
377be5aa1f
Adding tests
...
Signed-off-by: John Harris <john@johnharris.io>
2016-04-17 14:01:06 -04:00
Joffrey F
12ad3ff301
Injecting os.environ in Environment instance happens outside of init method
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:28 -07:00
Joffrey F
36f1b4589c
Limit occurrences of creating an environment object.
...
.env file is always read from the project_dir
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -07: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
1801f83bb8
Environment class cleanup
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -07:00
Joffrey F
5831b869e8
Update tests for new environment handling
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -07:00
Joffrey F
c69d8a3bd2
Implement environment singleton to be accessed throughout the code
...
Load and parse environment file from working dir
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -07:00
Daniel Nephin
be1476f24b
Only allow tmpfs on v2.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-21 14:41:28 -04:00
Philip Walls
85c7d3e5ce
Add support for docker run --tmpfs flag.
...
Signed-off-by: Philip Walls <pawalls@rabidgeek.com>
2016-03-18 18:19:48 -04:00
Dimitar Bonev
81b7fba33e
Allowing null for build args
...
Signed-off-by: Dimitar Bonev <dimitar.bonev@gmail.com>
2016-03-05 15:57:06 +02:00
Aanand Prasad
4ae71f41dd
Merge pull request #2832 from aanand/refactor-cli-unit-tests
...
Refactor CLI initialization and unit tests
2016-03-02 16:10:44 -08:00
Aanand Prasad
2c75a8fdf5
Extract helper methods for building config objects from dicts
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-03-02 15:09:48 -08:00
Aanand Prasad
f75408923e
Merge pull request #3053 from dnephin/handle_booleans_in_mappings
...
Don't allow booleans for mapping types
2016-03-02 15:04:20 -08:00
Daniel Nephin
18510b4024
Don't allow booleans for mapping types.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-01 11:57:35 -05:00
Daniel Nephin
b726f508a6
Fix merging of logging options in v1 config.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-01 11:43:26 -05:00
Aanand Prasad
adb8de367e
Merge pull request #2388 from dnephin/fix_long_lines
...
Wrap long lines
2016-02-25 16:52:33 -08:00
Daniel Nephin
dc3a5ce624
Refactor config validation to support constraints in the same jsonschema
...
Reworked the two schema validation functions to read from the same schema but
use different parts of it. Error handling is now split as well by the
schema that is being used to validate.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-24 16:20:17 -08:00
Daniel Nephin
d451578152
Make environment variables without a value the same as docker-cli.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-23 11:14:59 -08:00
Daniel Nephin
4b04280db8
Revert "Change special case from '_', None to ()"
...
This reverts commit 677c50650c
.
Revert "Modify service_test.py::ServiceTest::test_resolve_env to reflect new behavior"
This reverts commit 0019037712
.
Revert "Mangle the tests. They pass for better or worse!"
This reverts commit 7ab9509ce6
.
Revert "If an env var is passthrough but not defined on the host don't set it."
This reverts commit 6540efb3d3
.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-23 11:13:57 -08:00
Daniel Nephin
0a06d827fa
Fix warning about boolean values.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-22 14:56:01 -08:00
Daniel Nephin
d5514965d5
Merge pull request #2975 from dnephin/fix_crash_on_none_in_config
...
Fix validation message when there are multiple nested oneOf validations.
2016-02-19 15:53:26 -05:00
Daniel Nephin
02535f0cf1
Fix validation message when there are multiple ested oneOf validations.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-19 14:22:55 -05:00
Daniel Nephin
0d218c34c7
Make config validation error messages more consistent.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-19 13:12:57 -05:00
Daniel Nephin
4b2a666231
Validate that each section of the config is a mapping before running interpolation.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-19 12:38:52 -05:00
Joffrey F
7152f7ea76
Handle mismatched network formats in config files
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-18 15:24:41 -08: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
1952b52392
Constraint build argument types. Numbers are cast into strings
...
Numerical driver_opts are also valid and typecast into strings.
Additional config tests.
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-17 11:53:29 -08:00
Joffrey F
a8fda480e3
driver_opts can only be of type string
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-02-12 10:51:11 -08:00
Daniel Nephin
532dffd688
Fix build section without context.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-11 14:12:02 -05:00
Daniel Nephin
37564a73c3
Merge build.args when merging services.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-10 13:54:40 -05:00
Aanand Prasad
7b5bad6050
Merge pull request #2851 from cr7pt0gr4ph7/2839-fix-networks-merging
...
Fix merge behavior for 'networks' and 'network_mode'.
2016-02-10 17:51:01 +00:00
cr7pt0gr4ph7
582de19a5a
Simplify unit tests in config/config_test.py by using class variables instead of methods for parametrizing tests.
...
Signed-off-by: cr7pt0gr4ph7 <cr7pt0gr4ph7@gmail.com>
2016-02-08 21:57:15 +01:00
Joffrey F
fdf4a2e89e
Merge pull request #2734 from jrabbit/empty-env-var-2359
...
Empty env var #2359
2016-02-08 11:17:54 -08:00
Lukas Waslowski
e929086c49
Separate MergePortsTest from MergeListsTest and add MergeNetworksTest.
...
Signed-off-by: Lukas Waslowski <cr7pt0gr4ph7@gmail.com>
2016-02-08 14:29:03 +01:00
Daniel Nephin
57fc85b457
Wrap long lines and restrict lines to 105 characters.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-04 19:05:39 -05:00
Daniel Nephin
3ec87adccc
Update merge docs with depends_on, and correction about how links and volumes_from are merged.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-02 10:49:43 -05:00
Daniel Nephin
bf6a5d3e49
Fix merging of lists with multiple files.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-02-02 10:48:18 -05:00
Aanand Prasad
1152c5b25b
Tweak and test warning shown when version is a dict
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-02-02 13:58:34 +00:00
Aanand Prasad
ef8db3650a
Improve error messages for invalid versions
...
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-02-02 13:58:34 +00: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
Aanand Prasad
4ac004059a
Normalise/fix config field designators in validation messages
...
- Instead of "Service 'web' configuration key 'image'", just say
"web.image"
- Fix the "Service 'services'" bug in the v2 file format
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-02-02 13:47:43 +00:00