New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support network_mode in docker stack deploy #33055
Comments
As @thaJeztah points out in #25873 (comment) maybe this can be closed ? 🤔 With
you can get
|
I don't think so for this issue. I was looking more for the equivalent of "network_mode:service <service id/name>". Unless it would be possible to have the following network config:
Specifically, I'd like to have the ability to have one service use the network stack of another's so that it could communicate over a localhost interface rather than over a bridged/vxlan interface. |
Oh, sorry, I misunderstood. That makes sense 👍 |
I'd like to add the |
+1 ping - I hope this issue sees some more momentum! Is there anyone working on this issue? I also have a request - In addition to support for
I'd also like to request support for
so that multiple containers can share the same net namespace. Similar to |
+1 |
Is here anything new? Looking for this too. |
Is there any progress? Or any workaround to make network_mode service:abc working? |
Is there any news on this? |
Any news anybody? |
@DoctorBryson what option are you looking for specifically? |
@thaJeztah is there any alternative solution when using Swarm? I have this exact problem and it's driving me mad. |
Swarm services do not currently provide options to co-schedule containers / "pod" / "sidecar"-like constructs. For a "task of service a" to be using the network stack of "task of service b", those tasks must be scheduled on the same node, in addition to their lifecycle be coupled (e.g. if the "vpn" task would exit, all tasks using its network stack must also be recreated). Perhaps there's some creative ways to achieve this, but it's not currently supported out of the box (/cc @dperny) |
Thanks for the response, I maybe find a creative way to achieve this result, will try this: qdm12/gluetun#40 (comment) I think this is iterating over this idea: https://serverfault.com/questions/1012325/hiding-a-docker-container-behind-openvpn-in-docker-swarm-with-an-overlay-netwo |
Another solution could be this one: https://superuser.com/questions/1217990/connect-to-a-vpn-openvpn-from-a-docker-service-on-swarm But this means you need to configure NAT on every node of the swarm (?) it seems not ideal to me. |
I'd like to request that the "network_mode" from the docker-compose file be supported. I know that there's already been some discussion around this from those who'd like to use it for network_mode:host capabilities, but personally I'm more interested in the
network_mode:"service:<svc name>
".I'd also like to see this supported in the docker service create command or at least have the
--network
option be able to include the same semantics as the network_mode does in the compose file.The use cases I see for this are:
The first use case would definitely benefit from reviving container affinity constraints from the old swarm, but that could be worked around for now using the supported placement constraints from v3 compose format (or by making the network_mode:service itself be a deployment constraint).
The text was updated successfully, but these errors were encountered: