Basic Docker Container Linking with Node, Redis and RethinkDB
blog.spoxr.com
blog.spoxr.com
I think Docker Swarm has fixing this on the roadmap, but for now I think Kubernetes is the only thing to take into account the fact you'll probably want to have more than one node in a Docket cluster.
It's an extraction and repackaging of next-gen Cloud Foundry components.
The main goal last night was was fast, quick and dirty. Hopefully, I'll get a chance to write about more complex approaches in-depth going forward.
I have a similar blog post/slides > http://mherman.org/blog/2015/03/06/node-with-docker-continuo...
You should look at Docker Compose (formerly Fig) for container linking. Much easier.
Can some explain what is container linking?
Container linking lets containers connect to each other without exposing ports via docker.
The "linking" is exposed to the container via an /etc/hosts entry, so e.g. --link test-db:db adds "a.b.c.d db" to /etc/hosts which can be used by anything that needs it.
As mentioned by jon-wood, the simple linking approach only works with containers on the same machine unfortunately.
[0] https://docs.docker.com/articles/ambassador_pattern_linking/
Also, the network model is being revamped via https://github.com/docker/docker/issues/9983 to provide a more flexible plugins based Networking system which can also provide multi-host solution that is more powerful than the existing single-host multi-container linking system.
Once I have a satisfactory approach, I'll post a solution.