3

I am new to docker so this may be a very basic issue. I am attempting to ping www.google.com using a sh with the busybox image.

The command used is

docker run -it busybox sh
/ # ping www.google.com
PING www.google.com (216.58.210.196): 56 data bytes

After I stop the process the output is:

--- www.google.com ping statistics --- 65 packets transmitted, 0 packets received, 100% packet loss

from terminal ping returns the expected results:

ping www.google.com

output PING www.google.com (216.58.211.164): 56 data bytes

64 bytes from 216.58.211.164: icmp_seq=0 ttl=116 time=15.127 ms

64 bytes from 216.58.211.164: icmp_seq=1 ttl=116 time=13.711 ms

64 bytes from 216.58.211.164: icmp_seq=2 ttl=116 time=20.603 ms

64 bytes from 216.58.211.164: icmp_seq=3 ttl=116 time=13.303 ms

I am running docker on a MacBook

  • Does this answer your question? [My docker container has no internet](https://stackoverflow.com/questions/20430371/my-docker-container-has-no-internet) – Rezwan Dec 16 '20 at 23:12
  • No from the docker I can build the application so it is able to download npm. It only applies when attempting to ping from the shell – Chris Hunter-Johnson Dec 24 '20 at 20:02

0 Answers0