I pulled the Apache httpd image 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.
cat /etc/resolv.conf
shows the same nameserver, inside and outside of the container. I restarted the Docker service, but, it doesn't solve the problem either.
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
I tried to install Ping, but the package manager can't find it:
root@fb1ce4bccc11:/usr/local/apache2# yum -y install iputils-20160308-10.el7.x86_64
bash: yum: command not found