title: Docker container cannot resolve hosts
body: <p>From my host I can ping google</p>
  
  <pre><code>$ cat /etc/resolv.conf 
  nameserver 127.0.1.1
  search my.company.server
  
  $ ping google.com
  PING google.com (172.217.16.174) 56(84) bytes of data.
  64 bytes from fra15s11-in-f14.1e100.net (172.217.16.174): icmp_seq=1 ttl=54 time=11.0 ms
  64 bytes from fra15s11-in-f14.1e100.net (172.217.16.174): icmp_seq=2 ttl=54 time=10.7 ms
  </code></pre>
  
  <p>From the container I can reach internet:</p>
  
  <pre><code>$ docker run ubuntu:14.04 cat /etc/resolv.conf
  search my.company.server
  nameserver 8.8.8.8
  nameserver 8.8.4.4
  
  
  $ docker run ubuntu:14.04 ping 8.8.8.8
  PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
  64 bytes from 8.8.8.8: icmp_seq=1 ttl=45 time=16.4 ms
  64 bytes from 8.8.8.8: icmp_seq=2 ttl=45 time=16.3 ms
  </code></pre>
  
  <p>But can't ping a hostname:</p>
  
  <pre><code>$ docker run ubuntu:14.04 ping google.com
  &lt;no answer&gt;
  </code></pre>
  
  <p>Some environment info:</p>
  
  <pre><code>$ docker --version
  Docker version 1.10.1, build 9e83765
  
  $ cat /proc/version
  Linux version 4.2.0-27-generic (buildd@lgw01-12) (gcc version 5.2.1 20151010 (Ubuntu 5.2.1-22ubuntu2) ) #32-Ubuntu SMP Fri Jan 22 04:49:08 UTC 2016
  
  $ cat /proc/sys/net/ipv4/ip_forward
  1
  
  $ ps -ef|grep [d]ocker
  root   ....... /usr/bin/docker daemon -H fd://
  </code></pre>
  
  <p>Similar to this:
  <a href="https://stackoverflow.com/questions/29266560/docker-container-can-reach-dns-but-not-resolve-hosts">Docker container can reach DNS but not resolve hosts</a></p>
  
  <p>but a reboot doesn't help...</p>