Search code examples
dockerdnspingamazon-ecs

AWS ECS DNS resolution fails


Inside my docker container, the route output is as follos:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         ip-172-17-0-1.e 0.0.0.0         UG    0      0        0 eth0
172.17.0.0      *               255.255.0.0     U     0      0        0 eth0

When I try to ping ip-172-17-0-1.e, I get the following:

ping: unknown host ip-172-17-0-1.e

Pinging the ip ping 172.17.0.1 works... I accepted all defaults in my task definition and my network mode is bridge. Whats going on?


Solution

  • So I feel like an idiot... I've set the nameservers in the task defintion to 8.8.8.8 and 8.8.4.4...

    Removing those fixes the issue....