Commit Graph

76 Commits

Author SHA1 Message Date
8fc8babfdf Merge pull request #32564 from dnephin/compose-file-rel-dir
Set Composefile WorkingDir to dirname of the composefile.
Upstream-commit: 22d9eadee2f511c5d39c0458116738e05d5d1e98
Component: engine
2017-04-26 17:30:33 -07:00
178e6f9ebd Merge pull request #32632 from ColinHebert/compose_add_labels_during_build
Add support for labels during build with compose
Upstream-commit: bb5dfdb8c5acd48f17498b111db360820a50baec
Component: engine
2017-04-21 10:16:48 +02:00
f6580aefb9 Set Composefile WorkingDir to dirname of the composefile.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: cad32e0111cec6088cf26cbb122e816fc0a3f6c8
Component: engine
2017-04-17 15:14:58 -04:00
8e695a49da Regenerate schema with the correct libraries
Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
Upstream-commit: bddd9cce40d58d27551e796b9fae515b24eab40e
Component: engine
2017-04-15 13:00:23 +10:00
b9691f7292 Run go generate github.com/docker/docker/cli/compose/schema
Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
Upstream-commit: 0ee58cb3b94ad569f3642009343beac8eda0bacf
Component: engine
2017-04-15 10:57:43 +10:00
8df9b5486d Add support for labels during build with compose
Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
Upstream-commit: 1d1defa399157f1fc246bb5a8772bb1fc4305348
Component: engine
2017-04-15 05:31:28 +10:00
142883d5b3 Remove pkg/testutil/assert in favor of testify
I noticed that we're using a homegrown package for assertions. The
functions are extremely similar to testify, but with enough slight
differences to be confusing (for example, Equal takes its arguments in a
different order). We already vendor testify, and it's used in a few
places by tests.

I also found some problems with pkg/testutil/assert. For example, the
NotNil function seems to be broken. It checks the argument against
"nil", which only works for an interface. If you pass in a nil map or
slice, the equality check will fail.

In the interest of avoiding NIH, I'm proposing replacing
pkg/testutil/assert with testify. The test code looks almost the same,
but we avoid the confusion of having two similar but slightly different
assertion packages, and having to maintain our own package instead of
using a commonly-used one.

In the process, I found a few places where the tests should halt if an
assertion fails, so I've made those cases (that I noticed) use "require"
instead of "assert", and I've vendored the "require" package from
testify alongside the already-present "assert" package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 6052f2b3969feadb01662d8e2f30337d9c7f61af
Component: engine
2017-04-14 12:03:21 -07:00
7ec6dbcc2e Merge pull request #32059 from seriousben/support-dns-stack-file
add support for dns nameservers and search domains in stack files
Upstream-commit: 8a8c1961b58ef687e4a07002bdf1be4784ff7142
Component: engine
2017-04-11 21:32:52 +02:00
7254b7d783 Adding support for dns in stack files
Signed-off-by: Benjamin Boudreau <boudreau.benjamin@gmail.com>
Upstream-commit: 6b60a60729e0b22cc74197e5d00d1621435da7f7
Component: engine
2017-04-10 20:46:33 -04:00
73fce35ed0 Merge pull request #32062 from aaronlehmann/change-network-attachments
Support service network attachment changes
Upstream-commit: b0831acb09662431ecfed84677e7f5ed54635d52
Component: engine
2017-04-10 12:49:28 +02:00
f7bf680f7a cli: Deploying a compose file must use TaskTemplate.Networks
This is the non-deprecated field, and the one that can be changed in a
service update.

Since old daemon versions don't allow migrating from one field to the
other, make this conditional on the API version.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: b8e70747c625998c6e0678b79c51645de814a7c6
Component: engine
2017-04-07 16:46:25 -07:00
9156acdd4f Add support for volume consistency in compose format.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ae27355b095181748daa1d68d07f8e45904b14cc
Component: engine
2017-04-07 13:23:33 -04:00
a532c2b899 Merge pull request #32407 from dnephin/fix-rw-mode-compose-files
Support rw as a volume option in compose file
Upstream-commit: 30cdabd13f5cbb09370c3db3f5c7d1384043f3f4
Component: engine
2017-04-06 16:24:20 -04:00
0d79f39f39 Support rw as a volume option in compose file.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 062830535df4d944fd8e4d626f3da5bdc7b1993a
Component: engine
2017-04-06 10:32:35 -04:00
e25f6c5a1b Added start period option to health check.
Signed-off-by: Elias Faxö <elias.faxo@gmail.com>
Upstream-commit: e401f63735d8ebcff387c571d1f61ce52bdea86e
Component: engine
2017-04-06 12:35:34 +02:00
31fe55c058 Fix endpoint mode in Compose format.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 25f00866e3c0ec1d74c717d4e5974611479dc8ad
Component: engine
2017-04-03 17:51:31 -04:00
37e3d52b2f Do not replace fmt.Errorf in generated file
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 0d088186536aa480eea92f55f33ee41f66cec1a3
Component: engine
2017-03-27 18:33:41 -07:00
7cc7eec39f Replace fmt.Errorf() with errors.Errorf() in the cli
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7b7ea8ab810190018346cb7d84c161bb94f7ca60
Component: engine
2017-03-24 16:58:07 -04:00
ee11b02ced Fix external volume error to pass validation.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 72366869875f986fb0b22bcd66ce0fa5ed6288f9
Component: engine
2017-03-24 16:55:04 -04:00
2c87cf80c3 Cleanup compose convert error messages.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b03a18572363560845439eec041502014da85128
Component: engine
2017-03-24 10:43:28 -04:00
229e8f9746 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>
Upstream-commit: c165a8bfa1419724eb504f3cb7fdf3ca1b97483b
Component: engine
2017-03-23 16:09:57 +01:00
f3536ca0df 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>
Upstream-commit: d3dc27d145a36b3c81fd5999f2c525af95d9596a
Component: engine
2017-03-22 16:16:20 +01:00
8e8d5b8f70 Fixing a small typo in compose loader package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b8c45c3a570ad96ca59763361f6902ac694336d9
Component: engine
2017-03-20 15:39:57 +01:00
bddb190597 Merge pull request #30781 from AkihiroSuda/fix-stack-env
compose: fix environment interpolation from the client
Upstream-commit: 8bc703804de45bafe4e6362d150d6c74db8dd7db
Component: engine
2017-03-17 15:56:50 +01:00
95c8df3265 compose: update the comment about MappingWithEquals
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 2cdc9c42eb138bcaffb1cbd4172bd18b69446394
Component: engine
2017-03-17 06:21:55 +00:00
bdbc2fdcab Merge pull request #31896 from aaronlehmann/move-secretrequestoption
api: Remove SecretRequestOption type
Upstream-commit: d376b18caf3c9e2f3535399b450dc25004be1ecc
Component: engine
2017-03-16 21:31:15 +01:00
8203424840 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>
Upstream-commit: e7c39f4d5d761f68e6ac432934d8c3910e452855
Component: engine
2017-03-16 11:20:31 -07:00
6bac6aa413 Fix compose schema id for v3.2
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 576d2181e453dbbf75254aa11bc90c1a86a1384f
Component: engine
2017-03-16 13:53:58 -04:00
a5a1a8eade Merge pull request #31302 from dnephin/purge-orphaned-services
Add --prune to stack deploy
Upstream-commit: b0d1936d304824dc0438b200d269e2d4e0751fcc
Component: engine
2017-03-15 12:57:06 +01:00
b85681b72c 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
Upstream-commit: 95b46ff68fefdbd9b792768d0ca141589b493cbd
Component: engine
2017-03-14 17:14:09 -07:00
6a9291e20f Add --prune to stack deploy.
Add to command line reference.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 644fd804fce63499812259331b0a9f2a4a3ebcc4
Component: engine
2017-03-14 16:09:28 -04:00
258019e01c 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>
Upstream-commit: a9c86b63c03fc3557748d7792c11041387cb93d9
Component: engine
2017-03-14 16:00:43 -04:00
52e6564dcd 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>
Upstream-commit: ea43c33330ec9a1e9a9b8a85348c1757fdae65c4
Component: engine
2017-03-14 15:59:40 -04:00
2dc7385741 Merge pull request #31795 from dnephin/compose-file-v3.2
Compose file v3.2
Upstream-commit: cd56476f1862ae03cd125779e1d1f9fab293c248
Component: engine
2017-03-14 14:10:24 -04:00
975e2e2d89 Merge pull request #30597 from dnephin/add-expanded-mount-format-to-stack-deploy
Add expanded mount format to stack deploy
Upstream-commit: 49376cddab7d2ea28fd08fbbb75522656a72ed09
Component: engine
2017-03-14 17:53:28 +00:00
af1bbd0867 Add compose file version 3.2
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e7bf5be18b1a97b6f2b5eb6c6976fe9544589efe
Component: engine
2017-03-13 16:20:42 -04:00
b2d648703b Move endpoint_mode under deploy and add it to the schema.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 751552c65f244917ce74d09d0f528308a6b35755
Component: engine
2017-03-13 15:00:56 -04:00
a8bf637055 support both endpoint modes in stack
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 96790657288699146f579382f25d932c87125e86
Component: engine
2017-03-13 15:00:49 -04:00
da0af5d2c9 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
Upstream-commit: 8b02a15d527edeaae9135c3f6d23948bf95efb55
Component: engine
2017-03-11 01:59:43 +01:00
6d40d2a062 Merge pull request #31443 from james-nesbitt/export-more-compose-methods
exported add. cli compose loader parsing methods
Upstream-commit: fb024df8f0d18fdeff4b73979d51b44f268aeb6b
Component: engine
2017-03-08 15:12:42 +01:00
2678ec9975 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>
Upstream-commit: 96039b394adebfe2754a6e57419a44a9489b8005
Component: engine
2017-03-07 14:21:45 -05:00
26dbe98c09 exported cli compose loader parsing methods
Signed-off-by: James Nesbitt <james.nesbitt@wunderkraut.com>
Upstream-commit: a1560a0cf2401ccf37d6b6859b57a9eecd339089
Component: engine
2017-03-07 17:36:35 +02:00
5b615e9588 Convert new compose volume type to swarm mount type
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a1bbb2f7eac511fa1ccbff37a6b07a986a291838
Component: engine
2017-03-06 11:45:01 -05:00
c8a5ce81db Support expanded mounts in Compose loader
Add a test for loading expanded mount format.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 190dc5a40ab330bf0c2e2ce2954fd72526cabfe1
Component: engine
2017-03-06 11:45:01 -05:00
e14d3ca672 Parse a volume spec on the client, with support for windows drives
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 32c955b8fe7045e64b8f493c52af43f620373bec
Component: engine
2017-03-06 11:45:01 -05:00
578c6e5b0b Add expanded mount syntax to Compose schema and types.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 65c899bee501a81e004187528e732d944ef904d5
Component: engine
2017-03-06 11:45:01 -05:00
c96952c905 Support customizing the default network for a stack.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b7577dd2ad6fbb2cf21baf7ee082d2f605157b2a
Component: engine
2017-02-24 17:32:23 -05:00
20ebc63709 docker compose interpolation format error now includes a hint on escaping $ characters.
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 6d2a7eebcbdad0b7a44a27b4c65c9b3826b7e7f9
Component: engine
2017-02-24 11:37:40 -05:00
000b690000 Merge pull request #31088 from xulike666/make-code-readable-again
Typo fixed and this time I provide my cSpell.json
Upstream-commit: 8e5769445211f71635432dcdba17d31f2571e52a
Component: engine
2017-02-16 22:04:27 -05:00
fd3b01be58 Merge pull request #31006 from vdemeester/30991-secret-mode-in-stack-deploy
Set 0444 as default secret mode in stack deploy
Upstream-commit: a12454d7a964b99921adabdb8f741da5a94a0e66
Component: engine
2017-02-16 20:34:21 -05:00