docker static IP containers to communicate two different hosts


is it possible to change the ip of docker0 or provide a static IP to docker containers, because by default docker containers have the ip range of but my network is 192.168.X.X/24 in this situation on the server container is running there all the containers is able to communicate within servers but from other server this failed to connect.

How do you set up your cluster? Do you use Swarm? If so, you need to use a k/v storage backend to enable communication between two containers hosted on different hosts. Is this what you aim to do, or do you want the host to communicate with the container on the other host? Anyway, the solution is similar.

I re-writing a tuto for Docker Swarm to pull request it into their Swarm doc, you may want to take a look:

Have a nice day!