Using localhost to access running container

no problem… i just think we are missing one important piece of data…

Ya I hope so… Been stuck with this for quiet sometime.

Can you please check your email.

i replied… the problem is the app is listening on localhost:port
but INSIDE the container localhost is 172.17.0.x NOT the HOST ip address.

so you are trying to talk, but the server is not listening for you…

you need to fix this in the server config somehow

in one of my apps, I had to change localhost or 127.0.0.1 to 0.0.0.0 which means any

Are you using Docker for Windows? If so, there’s a known bug in the latest release and you’ll need to downgrade.

not his problem…

his problem is that his ‘server’ application is listening ONLY for a SPECIFIC callers address inside the container, instead of listening for ANY address.

in Mysql this is bind_address = 0.0.0.0, in mongo this is -bind_ip_all… etc…

the sample server is using listen 127.0.0.1:port… which works ok for a locally deployed application,
but inside the container 127.0.0.1 is INSIDE only