Assuming, my machine is named workstation-mine.company.network, with IP 10.11.12.13
I can't resolve it from any Docker, Edge version 2.0.3.0, container (with Kubernetes in the background), for example:
docker run -it --rm busybox
ping workstation-mine.company.network
fails with a "Bad Address" message, but
ping workstation-somebody-else.company.network
ping www.google.com
work fine, the IP address is resolved. I can also ping my IP 10.11.12.13, although response times are significantly longer than for pinging host.docker.internal.
Using nslookup, I can resolve all nearby workstation names in the company network into IPs, except mine:
nslookup workstation-mine.company.network
** server can't find workstation-mine.company.network: NXDOMAIN
nslookup 10.11.12.13
** server can't find 13.12.11.10.in-addr.arpa: NXDOMAIN
The docker installation is done in a quite huge script, which I just use, and usage `host.docker.internal' is not desired, because the destination to access may also be another machine.
There's one workaround by giving my own machine a custom name, like "my-host", and editing it into the Windows\system32\drivers\etc\hosts file. Then ping my-host
from the container works.
BTW,
I don't know if it is related, but I keep getting DNS errors in the ProgramData\DockerDesktop\Service.txt log:
[14:31:31.414][ApiProxy ][Info ] time="2019-03-26T14:31:31+01:00" msg="unknown DNS query type 13" [14:31:31.414][ApiProxy ][Info ] time="2019-03-26T14:31:31+01:00" msg="DNS failure: 1160493135005290919.1659836570884043770.\tIN\t HINFO: unknown query type"
and
[15:40:08.358][ApiProxy ][Info ] time="2019-03-26T15:40:08+01:00" msg="DNS failure: docker-desktop.\tIN\t AAAA: errno 9002: DnsQuery: DNS server failure."
The first DNS error seems to be related to some unusual, listed-as-deprecated HINFO row type from the nameserver, the second to IP v6 (AAAA meaning IP v6).