Post date: Jun 13, 2016 6:13:53 AM
To allow Docker containers to access services exposed on the Docker Host.
The Docker Host creates a bridge (docker0) that connects Docker Containers to the Docker host.
The IP address of the docker bridge can be used by Containers to connect to the host.
On the Docker Host:
DOCKER_HOST=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+')
Pass this variable in the "docker run" command to override a Dockerfile environment variable.