Commit Graph

54 Commits

Author SHA1 Message Date
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
29e3dcbbb0 why there are so many mistakes in our repo (up to /cmd)
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: f8a40477960976f12dbbb72e5b133b5b0f05f9b3
Component: engine
2017-02-17 00:32:48 +08:00
55b4b2547e 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>
Upstream-commit: f2b68c6cc1664ca0c60457b8c713eec52902a2d2
Component: engine
2017-02-16 11:26:05 +01:00
a3ebb4bd61 fix docker stack volume's nocopy parameter
Signed-off-by: bingshen.wbs <bingshen.wbs@alibaba-inc.com>
Upstream-commit: 4fe611958cc7d44a2a9d95ab892340349ed02072
Component: engine
2017-02-15 19:46:27 +08:00
d6535af489 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>
Upstream-commit: f07a28a54165b6a2e49e9d0e6d3a111252095cb5
Component: engine
2017-02-07 09:14:56 -08:00
5c8fdca78f 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>
Upstream-commit: 60c1eaf8f08f904248cbfa0d07d850025a35e6d0
Component: engine
2017-02-07 09:12:55 -08:00
a86724bb15 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>
Upstream-commit: cf4b7a5b876cfa91a1bea22d248e4925c8e2bf71
Component: engine
2017-02-04 14:16:06 -08:00
20b0782c41 Merge pull request #30506 from vdemeester/29732-follow-up-compose-indempotent
Make docker stack deploy a little bit more indempotent
Upstream-commit: feb8b1c5818c178a9d51f539c8afca7f0c759ac4
Component: engine
2017-01-31 13:35:04 -08:00
4f66b8d7bd 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>
Upstream-commit: daaeeafa7ae3a4afbff530861a9ed4a97e2c431f
Component: engine
2017-01-27 17:03:41 -05:00
516582f2e7 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>
Upstream-commit: 8b1c6bfe3d779c05917b08d3c0de03b78ce68672
Component: engine
2017-01-27 16:09:02 +01:00
9e237a57b2 Set default values for uid and gid to prevent errors when starting a service.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 167b3f95b7f659817f8421742ca4078edd42dbaa
Component: engine
2017-01-26 12:00:46 -05:00
dd9f330ae3 Rebase Compose v3.1 schema on the latest v3 schema.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b4f23bbc69f58662f8d94b0492d693e43d523e47
Component: engine
2017-01-26 11:33:15 -05:00
f693277e41 Test and fix external secrets in stack deploy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b3427e43edc56824f762e964c955b906fa363a3a
Component: engine
2017-01-26 11:33:15 -05:00
5ed83fcbc5 Add integration test for stack deploy with secrets.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6ec84ef76df30663d5728f903b314f4486587135
Component: engine
2017-01-26 11:33:15 -05:00
fc26836a78 Implement secret types for compose file.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9419e7df2b54b684bef6c787239a2c92fbb4acda
Component: engine
2017-01-26 11:33:15 -05:00
9fa961acee Add v3.1 schema and support validating multiple version.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 65374488f92512cf34667cb71ea6d62985310f65
Component: engine
2017-01-26 11:33:15 -05:00
f1f3f030a1 Add missing network.internal.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 408fd20be25c309454503c0b1e1c31914cf87dad
Component: engine
2017-01-20 12:53:19 -05:00
22c718e439 Update Compose schema to match docker-compose.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: de1ffebf19595e061c85727a4c34ac02ad4e934d
Component: engine
2017-01-20 12:36:57 -05:00
af2c613c23 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>
Upstream-commit: 135f8f967488f171fcda6c66d7fa35726edaf19c
Component: engine
2017-01-13 18:05:51 -05:00
b112b94b43 Improve the error message for extends in stack deploy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 46422df4900be14730447045cc1b1da3ebbf1e28
Component: engine
2017-01-11 11:57:24 -05:00
c1d7d93cb3 Few stack deploy network fixes
- Make sure we use the correct network name for external ones.
- Make the default network overridable and only creates networks that
  are used by services — so that default network is only created if a
  service doesn't declare a network.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 3191f5809bc1233bbf2103d2432b75cac93567bb
Component: engine
2017-01-10 10:29:09 +01:00
6300d8ca1e Fix parsing resources from compose file for stack deploy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e3f083530f27bc57fceab684fb3182b79a960e79
Component: engine
2017-01-09 14:22:02 -05:00
775c5633ef *: use opencontainers/go-digest package
The `digest` data type, used throughout docker for image verification
and identity, has been broken out into `opencontainers/go-digest`. This
PR updates the dependencies and moves uses over to the new type.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 7a855799175b6b984886ef1cfa337d6df1d4c668
Component: engine
2017-01-06 18:48:41 -08:00