Docker Community Forums

Share and learn in the Docker community.

Cannot reach the server IP address from container

docker

(Reechee88) #1

Hi,

I am running several containers and from one of them I try to reach the server, where the whole system is deployed.
Issue:

Container X is the container who try to reach 1.2.3.4 ip address (ip address where Container X is running) with curl -> timeout
Container X is the container who try to reach 5.6.7.8 ip address (random ip) -> curl successful
Container X can reach everything, but the self running Container X

I have no idea what’s going on. When I run this compose file from local, I can reach the server. Problem only occurs, when it try to reach itself.

So in other words, you’re trying to reach container X from inside container X using its host facing IP.

i am using docker-compose.

Please help me.
Richard


(Sam) #2

what is the host os?

windows, mac, linux?


(Reechee88) #3

It is an Ubuntu server