Docker Community Forums

Share and learn in the Docker community.

Figure out IP address of host

(Peterlauri) #1

I have an application that serves different services based on hostname. When using docker-machine, I have been using /etc/hosts to map my local testing domains to the docker-machine ip default ip address.

So I have been having an entry like this in /etc/hosts

Now with Docker for Mac, I cannot figure out a way to get the IP address for the docker host machine. Any way to do this?

(Mathew Peterson) #2

I believe everything is bound to (localhost) since beta9:

(Peterlauri) #3

This is what I also thought. I have narrowed down my problems to my dockercloud/haproxy that somehow refuse connections after migrating to docker for mac :confused:

If I run the sample nginx app, and map 80:80, it works by accessing, but with my docker-compose setup it doesn’t work… Maybe there is some bug with docker compose… I’ll try to narrow it down a bit further :slight_smile:

(Peterlauri) #4

Ok. Commented out my loadbalancer (dockercloud/haproxy) and expose 80:80 from my web app instead, and then all works like a charm :confused:

I don’t know where to file this…

(Peterlauri) #5

Filed the issue on github, and minutes after I found the solution for it :slight_smile: