DEV Community

Discussion on: Docker Basics- How to connect containers using docker networks.

Collapse
 
andreanidouglas profile image
Douglas R Andreani

If I set a mariadb docker and link it to my node application, wherever a need to specify the ip for the Server I just add the name of the mariadb docket?

Collapse
 
mozartted profile image
Osita Chibuike

Yea...the docker setup automatically links it as the container's IP. In your instance the service name would do.. For instance mariadb could serve as the service name

Collapse
 
andreanidouglas profile image
Douglas R Andreani

I see. pretty powerful indeed