Looking at https://docs.docker.com/desktop/networking/ it says
I want to connect from a container to a service on the host The host has a changing IP address, or none if you have no network access. We recommend that you connect to the special DNS name
host.docker.internal
which resolves to the internal IP address used by the host.
When I try this I get "The remote name could not be resolved".
I found this open issue which has a script to map the network gateway port to the host.docker.internal
but this just results in "Unable to connect to the remote server".
hostname
trick is a gamechanger. Works perfectly. Thank you.