Service discovery with docker-compose doesn't work for me

Host OS: Windows 10 Enterprise, 1703 (OS Build 15063.502)
Docker version: 17.06.0-ce


I have this simple docker-compose.yml:

version: "3.3"

    image: "microsoft/iis"
    image: "microsoft/iis"

I do a docker-compose up -d and then docker-compose exec first Powershell.exe to get a prompt on the “first” box.

Now when I call ping second I expect a result, but after what seems like a timeout, it returns:

Ping request could not find host second. Please check the name and try again.

If I instead find the IP address of the “second” host using docker inspect, I can ping it from “first”.

It seems to me like the “local” dns server that is supposed to resolve the container names isn’t answering calls. I’ve found the DNS server IP with Get-DnsClientServerAddress, and when I ping it I get a time out.

I’m pretty sure this is caused by something in our environment. A group policy, firewall rule or something similar. It works just fine on my computer at home.

What should I look for?

Best regards
Anders Ljusberg