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.

Thx!

  • Docker in host mode cannot connect to database running on host
  • What checksum does Docker use for caching COPY?
  • Dockerfile for tomcat
  • Install later version of docker-engine stuck on Travis build
  • Couldn't connect to the Docker daemon due to an SSL
  • Compile Tensorflow from source with Docker to get CPU speed up
  • docker: port mapping not working on non default machine
  • Ant not working with Jenkins within a Docker container
  • How to setup a quick deployment process?
  • Using ARG command in a sub Dockerfile
  • (gcloud.preview.app.deploy) Unexpected Error. Deployed Version
  • Why people create virtualenv in a docker container?
  • 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.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.