cli icon indicating copy to clipboard operation
cli copied to clipboard

Added "scope" to docker-cli compose

Open glyif opened this issue 8 years ago • 13 comments

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).

20170630_204546

glyif avatar Aug 06 '17 16:08 glyif

Codecov Report

Merging #420 into master will increase coverage by <.01%. The diff coverage is 100%.

@@            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

codecov-io avatar Aug 06 '17 16:08 codecov-io

afaik we're still good for 3.4

dnephin avatar Aug 22 '17 14:08 dnephin

@glyif looks like this needs a rebase

@dnephin @vdemeester is this ready to go other than a rebase?

thaJeztah avatar Sep 26 '17 14:09 thaJeztah

@thaJeztah @dnephin I think we missed the 3.4 window :sweat_smile: but other than that we are good to go :angel:

vdemeester avatar Sep 26 '17 14:09 vdemeester

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 avatar Sep 26 '17 14:09 dnephin

@dnephin @thaJeztah @glyif Added a 3.7 schema version (as 3.6 is already on 18.02) and rebased this PR 👼

vdemeester avatar Jan 26 '18 02:01 vdemeester

cc @shin- for docker/compose 👼

vdemeester avatar Jan 26 '18 02:01 vdemeester

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?

dnephin avatar Jan 26 '18 20:01 dnephin

moving back to design review

ping @fcrisciani WDYT?

thaJeztah avatar Feb 13 '18 22:02 thaJeztah

@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

fcrisciani avatar Feb 20 '18 23:02 fcrisciani

Will this be merged anytime soon? Thx!

dankolesnikov avatar Jan 16 '19 21:01 dankolesnikov

Would love to see this PR merged!

unixfox avatar Dec 06 '19 17:12 unixfox

Any chance of this being merged?

nbx3 avatar Dec 08 '24 20:12 nbx3