Docker – few containers
Who could explain how create and connect one to other docker containers.
I need info how connect one container with Nginx to second container with PostgreSQL. How make this relation?
First container with Nginx should get info from second container with Postgre.
I know how create container, how start service but i don’t know how create relation.
One Solution collect form web for “Docker – few containers”
There are a number of ways, usually involving an external script or other such system to collect information (such as port mappings) from one container, by parsing the json info or getting the port mappings, and passing that into a new container that would use it to connect to the first. There are examples of that in the documentation and examples section.
With v0.6.5, released 2013-10-31, Docker is adding the ability to coordinate some of this within itself. For now (2013-11-01), the blog post has most of the information on how to use it, but keep you eye on the documention for more.