When I want to access a database server running on my host machine from a docker container I can use host.docker.internal as the hostname in my database connection string.
host.docker.internal
telephone: +44 07867 784162
email: paul@p3d.co.uk
twitter: @p3d