Docker Community Forums

Share and learn in the Docker community.

Would like to know how to link the containers of the applicaion

Hi team,

Would like to know some key concepts on the Docker containers, let me elaborate the scenario a bit more. We are planning to build an application(3-tier). So this application we would like to publish using the docker containers and was confused about how to connect those and get the fully loaded application. So for this, we were planning to have an application server hosted on a container, DB hosting on a container, the front end needs to be hosted on a different container. So for this, we need to interconnect the containers to have the application in one go. SO could some help me to get this context fulfilled? Please correct me if am pointing anything wrong in the scenario and suggest us with the valuable needy. That helps to have a good idea of how to use the Docker containers.
Please update the same conversation which is going to be posted on the DevOps forums as well.


Docker has a built-in service discovery mechanism. All containers or swarm mode services that are on a user-defined network will be able to resolve eachother by the name of the container/service.

If you are using docker-compose or ‘docker stack deploy’, then you’ll get the user-defined network created for you automatically. See and

I also have a github repo with instructions to step through utilizing the built-in service discovery and do DNS requests to see what’s going on:

Thankq for the quick response with the supportive links, will follow the instructions and will proceed for it. will get back if struck to seek some more help/support in this regards. Thanks once again. Have a great time.