Added "scope" to docker-cli compose
Fixes #410
- What I did I updated the docker-cli's compose to be able to take in scope as a network key with a value of swarm or local. feature request for : https://github.com/docker/cli/issues/410
- How I did it I updated the config_schema, added the scope to the Network Config struct, generated new bindata, edited tests to test for the scope.
- How to verify it This currently only works with the --compose-file flag in the docker-cli, but doesn't work with docker-compose yet. I will be working on that next
- Description for the changelog I updated the config_schema, added the scope to the Network Config struct, generated new bindata, edited tests to test for the scope.
- A picture of a cute animal (not mandatory but encouraged) My dogs, Hex the Husky (left) and Linux the Aussie (right).

Codecov Report
Merging #420 into master will increase coverage by
<.01%. The diff coverage is100%.
@@ Coverage Diff @@
## master #420 +/- ##
==========================================
+ Coverage 52.96% 52.96% +<.01%
==========================================
Files 244 244
Lines 15828 15829 +1
==========================================
+ Hits 8383 8384 +1
Misses 6891 6891
Partials 554 554
afaik we're still good for 3.4
@glyif looks like this needs a rebase
@dnephin @vdemeester is this ready to go other than a rebase?
@thaJeztah @dnephin I think we missed the 3.4 window :sweat_smile: but other than that we are good to go :angel:
I think so, this will need to be moved to the 3.5 schema since 3.4 has been released, but we can do that as a follow up if necessary
@dnephin @thaJeztah @glyif Added a 3.7 schema version (as 3.6 is already on 18.02) and rebased this PR 👼
cc @shin- for docker/compose 👼
Hmm, thinking about this again. Are we sure this is something we want to expose in the Compose file?
If someone uses scope: local will the services actually be able to connect to it? I guess only if the service is on the same node?
moving back to design review
ping @fcrisciani WDYT?
@thaJeztah host, none, bridge are all only local networks, overlay is only swarm scope and macvlan can be both, but in the case of swarm scope a config is going to be needed for each node. Not super clear to me how these possible scenarios are actually handled with a simple compose
Will this be merged anytime soon? Thx!
Would love to see this PR merged!
Any chance of this being merged?