I have a small cluster at rackspace with a private network in the range I would like my worker services to talk to each other using this network but can't figure out how to get docker to allow that.

My ideal configuration would be a single public-facing container that proxies the connections to a worker that can then talk to various services within the private network to do its job.

eth0 -> load balancer --> --> (db)
                      \-> /

If all the workers were on the same machine I could accomplish this with docker run --link ... but since they're on different machines, that won't work.

The workers in the above example are started with a command similar to this:

docker run -d -p $PRIVATE_IPV4:80:80 myworker

and the database started like this:

docker run -d -p $PRIVATE_IPV4:1234:1234 mydb

From the host I can talk to each of the containers just fine but each container cannot route to any other container. I.E. curl works from the host, but not from a container running on the host.

The load balancer in this case is nginx started like this:

docker run -d -p $PUBLIC_IPV4:80:80 nginx


upstream app {

This seems like it would be a pretty standard configuration. What am I doing wrong?


You can try implementing your architecture in a container manager like Kubernetes on top of CoreOS. There are many guides out there. This is a walk-through from a presentation at DockerCon https://www.brighttalk.com/webcast/11427/136165 about Container Cluster Management.


Currently, Docker by itself does not provide container networking facilities. Weave is one of the easiest to use overlay SDN solutions. It works in any cloud and even across multiple clouds.

I should disclaim, I am one of Weave engineering team.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.