Docker Networking Issue to connect Other container

0

Recently I have been worked on two-tier application deployment so I created two different docker containers and first is MySQL container and the rest is just a notepad project container so, I saw that both docker containers have interconnected with each others and I created a docker network to interconnected each others.

But both containers have not connected each others so, anyone can suggested me which docker network are suitable for this condition, I have created (Bridge network) that is correct for this scenario based

profile picture
已提问 3 个月前366 查看次数
1 回答
0

Hello Amit,

Your network choice is correct for this scenario. You might want to double-check if you specified the same network name when creating both containers. Typos or inconsistencies can lead to connectivity issues. Also, Ensure you've correctly mapped the port used by your Node.js project to access the MySQL database within the network. Lastly you can use docker-compose for better management of multiple containers

Thanks

已回答 3 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则