Daniel Nephin
b03a185723
Cleanup compose convert error messages.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-24 10:43:28 -04:00
Vincent Demeester
c165a8bfa1
Make sure we error out instead of panic during interpolation
...
Use type assertion to error out if the type isn't the right one
instead of panic as before this change.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-03-23 16:09:57 +01:00
Vincent Demeester
d3dc27d145
Remove compose types.Dict alias
...
It is just an alias type and make the code a little bit more complex
and hard to use from outside `compose` package.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-03-22 16:16:20 +01:00
Vincent Demeester
b8c45c3a57
Fixing a small typo in compose loader package
...
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-03-20 15:39:57 +01:00
Vincent Demeester
8bc703804d
Merge pull request #30781 from AkihiroSuda/fix-stack-env
...
compose: fix environment interpolation from the client
2017-03-17 15:56:50 +01:00
Akihiro Suda
2cdc9c42eb
compose: update the comment about MappingWithEquals
...
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-03-17 06:21:55 +00:00
Sebastiaan van Stijn
d376b18caf
Merge pull request #31896 from aaronlehmann/move-secretrequestoption
...
api: Remove SecretRequestOption type
2017-03-16 21:31:15 +01:00
Aaron Lehmann
e7c39f4d5d
api: Remove SecretRequestOption type
...
This type is only used by CLI code. It duplicates SecretReference in the
types/swarm package. Change the CLI code to use that type instead.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-03-16 11:20:31 -07:00
Daniel Nephin
576d2181e4
Fix compose schema id for v3.2
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-16 13:53:58 -04:00
Sebastiaan van Stijn
b0d1936d30
Merge pull request #31302 from dnephin/purge-orphaned-services
...
Add --prune to stack deploy
2017-03-15 12:57:06 +01:00
Anusha Ragunathan
95b46ff68f
Merge pull request #31147 from adshmh/30629-print-escaping-hint-on-invalid-interpolation-format
...
docker stack deploy interpolation format error due to not escaping $ now includes a hint
2017-03-14 17:14:09 -07:00
Daniel Nephin
644fd804fc
Add --prune to stack deploy.
...
Add to command line reference.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-14 16:09:28 -04:00
Daniel Nephin
a9c86b63c0
Fix environment resolving.
...
Load from env should only happen if the value is unset.
Extract a buildEnvironment function and revert some changes to tests.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-14 16:00:43 -04:00
Akihiro Suda
ea43c33330
compose: fix environment interpolation from the client
...
For an environment variable defined in the yaml without value,
the value needs to be propagated from the client, as in Docker Compose.
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-03-14 15:59:40 -04:00
Daniel Nephin
cd56476f18
Merge pull request #31795 from dnephin/compose-file-v3.2
...
Compose file v3.2
2017-03-14 14:10:24 -04:00
Justin Cormack
49376cddab
Merge pull request #30597 from dnephin/add-expanded-mount-format-to-stack-deploy
...
Add expanded mount format to stack deploy
2017-03-14 17:53:28 +00:00
Daniel Nephin
e7bf5be18b
Add compose file version 3.2
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-13 16:20:42 -04:00
Daniel Nephin
751552c65f
Move endpoint_mode under deploy and add it to the schema.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-13 15:00:56 -04:00
allencloud
9679065728
support both endpoint modes in stack
...
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-03-13 15:00:49 -04:00
Sebastiaan van Stijn
8b02a15d52
Merge pull request #31176 from adshmh/29662-stack-deploy-error-if-external-combined-with-other-volume-options
...
stack deploy exits with error if both 'external' and other options are specified for a volume
2017-03-11 01:59:43 +01:00
Sebastiaan van Stijn
fb024df8f0
Merge pull request #31443 from james-nesbitt/export-more-compose-methods
...
exported add. cli compose loader parsing methods
2017-03-08 15:12:42 +01:00
Arash Deshmeh
96039b394a
stack deploy exits with error if both 'external' and any other options are specified for volumes
...
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2017-03-07 14:21:45 -05:00
James Nesbitt
a1560a0cf2
exported cli compose loader parsing methods
...
Signed-off-by: James Nesbitt <james.nesbitt@wunderkraut.com>
2017-03-07 17:36:35 +02:00
Daniel Nephin
a1bbb2f7ea
Convert new compose volume type to swarm mount type
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-06 11:45:01 -05:00
Daniel Nephin
190dc5a40a
Support expanded mounts in Compose loader
...
Add a test for loading expanded mount format.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-06 11:45:01 -05:00
Daniel Nephin
32c955b8fe
Parse a volume spec on the client, with support for windows drives
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-06 11:45:01 -05:00
Daniel Nephin
65c899bee5
Add expanded mount syntax to Compose schema and types.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-06 11:45:01 -05:00
Daniel Nephin
b7577dd2ad
Support customizing the default network for a stack.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-02-24 17:32:23 -05:00
Arash Deshmeh
6d2a7eebcb
docker compose interpolation format error now includes a hint on escaping $ characters.
...
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2017-02-24 11:37:40 -05:00
Brian Goff
8e57694452
Merge pull request #31088 from xulike666/make-code-readable-again
...
Typo fixed and this time I provide my cSpell.json
2017-02-16 22:04:27 -05:00
Brian Goff
a12454d7a9
Merge pull request #31006 from vdemeester/30991-secret-mode-in-stack-deploy
...
Set 0444 as default secret mode in stack deploy
2017-02-16 20:34:21 -05:00
Aaron.L.Xu
f8a4047796
why there are so many mistakes in our repo (up to /cmd)
...
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
2017-02-17 00:32:48 +08:00
Vincent Demeester
f2b68c6cc1
Set 0444 as default secret mode in stack deploy
...
Change the default secret mode to match the default one used in
`service` subcommands.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-02-16 11:26:05 +01:00
bingshen.wbs
4fe611958c
fix docker stack volume's nocopy parameter
...
Signed-off-by: bingshen.wbs <bingshen.wbs@alibaba-inc.com>
2017-02-15 19:46:27 +08:00
Yong Tang
f07a28a541
Support expanded ports in Compose loader
...
This commit adds support for expanded ports in Compose loader,
and add several unit tests for loading expanded port format.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-02-07 09:14:56 -08:00
Yong Tang
60c1eaf8f0
Add expanded port syntax to Compose schema and types.
...
This commit adds expanded port syntax to Compose schema and types
so that it is possible to have
```
ports:
- mode: host
target: 80
published: 9005
```
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-02-07 09:12:55 -08:00
Yong Tang
cf4b7a5b87
Add compose support of attachable
in networks
...
This fix tries to address the issue raised in 29975 where
it was not possible to specify `attachable` flag for networks
in compose format.
NOTE: Compose format aleady supports `labels` in networks.
This fix adds the support of `attachable` for compose v3.1 format.
Additiona unit tests have been updated and added.
This fix fixes 29975.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-02-04 14:16:06 -08:00
Phil Estes
feb8b1c581
Merge pull request #30506 from vdemeester/29732-follow-up-compose-indempotent
...
Make docker stack deploy a little bit more indempotent
2017-01-31 13:35:04 -08:00
Daniel Nephin
daaeeafa7a
Remove the old loading system from compose config loading
...
The original Compose config loading used the `compose` tag, which
was replaced by mapstructure. Some fields were left on the old tag. This
commit removes the old tag and uses types and mapstructure.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-27 17:03:41 -05:00
Vincent Demeester
8b1c6bfe3d
Make docker stack deploy a little bit more indempotent
...
Sort some slice fields before sending them to the swarm api so that it
won't trigger an update.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-27 16:09:02 +01:00
Daniel Nephin
167b3f95b7
Set default values for uid and gid to prevent errors when starting a service.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-26 12:00:46 -05:00
Daniel Nephin
b4f23bbc69
Rebase Compose v3.1 schema on the latest v3 schema.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-26 11:33:15 -05:00
Daniel Nephin
b3427e43ed
Test and fix external secrets in stack deploy.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-26 11:33:15 -05:00
Daniel Nephin
6ec84ef76d
Add integration test for stack deploy with secrets.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-26 11:33:15 -05:00
Daniel Nephin
9419e7df2b
Implement secret types for compose file.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-26 11:33:15 -05:00
Daniel Nephin
65374488f9
Add v3.1 schema and support validating multiple version.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-26 11:33:15 -05:00
Daniel Nephin
408fd20be2
Add missing network.internal.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-20 12:53:19 -05:00
Daniel Nephin
de1ffebf19
Update Compose schema to match docker-compose.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-20 12:36:57 -05:00
Tony Abboud
135f8f9674
Add error checking for hostPort range
...
This fix catches the case where there is a single container port
and a dynamic host port and will fail out gracefully
Example docker-compose.yml snippet:
port:
ports:
- "8091-8093:8091"
- "80:8080"
Signed-off-by: Tony Abboud <tdabboud@hotmail.com>
2017-01-13 18:05:51 -05:00
Daniel Nephin
46422df490
Improve the error message for extends in stack deploy.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-11 11:57:24 -05:00