Get the host IP address from inside a docker container

Problem

You wold like to know the IP Address of your host from inside a running docker container.

Solution

Run the following inside the container:

route | awk '/^default/ { print $2 }'