I think it should be possible to join an non-docker server to an overlay network so that it may communicate on the same subnet.
Use case: I have a consul cluster outside of docker that we use for the swarm cluster configuration. We also want consul agents to run inside the overlay network where services can use them.
The problem is that the consul servers outside of docker can’t route to the overlay network.
I’m thinking this will entail manual veth pairs and a bridge on the non-docker server, but I haven’t been able to get it to work yet.
I have the same problem where I use an overlay network for my containers but the Consul servers (EC2 instances) reside in another network and, therefore, the Consul servers cannot monitor the containers.
Does anybody have a solution for that?
I’m already using registrator in order to register new services (containers) but still it doesn’t change the fact that the containers have different IP addresses (in the overlay network) which are different from the IP addresses that the Consul servers have.
Since the Consul servers cannot even ping the containers the monitoring function doesn’t work.
Currently I’m not going to use ECS as I’m already working with Swarm
It would be great if docker could handle this in the client. Imagine if a command like this existed: docker network connectto my_overlay_or_bridged_network
that would configure routes and get a new ip for the local machine (e.g. your laptop or a non-docker server). I guess it would have to detect ip range collisions and fail with an error.
Then you could access the containers by their ip and exposed ports. This would be very useful when developing and debugging a service locally that talks to all the nodes of a scaled service.
If anyone knows if this is possible with some scripting, or if it’s not practical for some reason, please update the issue. Maybe the answer is "you need to use https://www.weave.works/ .