How to access boot2docker-ip from inside a docker container
One Solution collect form web for “How to access boot2docker-ip from inside a docker container”
I don’t know whether there is a built-in solution, but you may hand over the host’s IP address as environment variable when starting the container. Then inside the container you can access it like any other environment variable.
So, basically this comes down to:
$ docker run -e HOST_IP=… [the rest of the run command]
This maybe is not the most elegant solution, but it’s simple and it works in a reliable way.