DEV Community

Discussion on: Learn Docker - from the beginning, part III databases and linking

Collapse
 
aymdev profile image
AymDev

There are things I did not get when we used --net. How do the containers communicate ?

Mine could not find the MySQL container with the previous "mysql" alias. After running docker inspect mysql-db I used the IP stated from the output at NetworkSettings.Networks.isolated_network.Gateway as the mysql host parameter.
I doubt that this is a reliable solution, how should I proceed to make it easier ?