On Mac and Windows it is possible to use docker.for.mac.host.internal (replaces docker.for.mac.localhost) and docker.for.win.host.int
For linux there isn't a default DNS name for the host machine. This can be verified by running the command:
docker run -it alpine cat /etc/hosts
This feature has been requested, however wasn't implemented. You can check this issue. As discussed you can use the following command to find the IP of the host from the container.
netstat -nr | grep '^0\.0\.0\.0' | awk '{print $2}'
Alternatively, you can provide the host ip to the run command via docker run --add-host dockerHost: