News for hackers. Stuff that matters.
Re:Basic Docker Container Linking with Node, Redis and Rethi... by virulent on Sunday March 08, 2015 @09:02AM (#9165439)
Ports inside a container aren't exposed publicly unless explicitly done.

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.

Re:Basic Docker Container Linking with Node, Redis and Rethi... by theod on Sunday March 08, 2015 @01:02PM (#9166194)
The concepts of Linking are being revisited via the network revamp proposal with the help of Network Plugins : https://github.com/docker/docker/issues/9983. With the plugins providing State Distribution and Service Discovery the containers can be effectively linked across multi-host network.