title: Ping won't install inside a Docker container
body: <p>I pulled the <a href="https://hub.docker.com/_/httpd" rel="nofollow noreferrer">Apache httpd image</a> and ran a container. However, once, I'm inside a container, ping doesn't work and I see an error: "bash: ping: command not found". Can't even ping 127.0.0.1. Ping is working outside of a container.</p>
  
  <p><code>cat /etc/resolv.conf</code> shows the same nameserver, inside and outside of the container. I restarted the Docker service, but, it doesn't solve the problem either. </p>
  
  <pre><code>docker pull httpd
  docker run -d --name testweb httpd
  docker exec -it testweb /bin/bash
  ping google.com
  
  root@fb1ce4bccc11:/usr/local/apache2# ping google.com
  
  bash: ping: command not found
  </code></pre>
  
  <p>I tried to install Ping, but the package manager can't find it:</p>
  
  <pre><code>root@fb1ce4bccc11:/usr/local/apache2# yum -y install iputils-20160308-10.el7.x86_64
  bash: yum: command not found
  </code></pre>