Docker Community Forums

Share and learn in the Docker community.

Docker Container mysql is only getting connected with it's container IP address not with localhost

Hi All,

Let me explain my situation clearly.
I have 2 containers on same docker network. Mysql and Springboot war on Tomcat.
While creating war file i am forced to provide Mysql container IP then Application is able to connect with mysql otherwise not getting connected.

Can you help me to please resolve this problem.
Mysql container is only accessible on it’s IP, I want this to be accessible on localhost from other containers.