I’ve been reading the docker container networking document to try and get
my ubuntu containers to connect to the internet via my digital ocean droplet.
It says to do the following:
You can attach to a running container and investigate its configuration:
Then use ping to send three ICMP requests and test the connectivity of the containers on this bridge network
But the ubuntu container has no ping utility. Can someone explain what I need to do here?
run this command “docker run -it ubuntu:14.04 bash”
docker@docker-datacenter-demo-3:~$ docker run -it ubuntu:14.04 bash
root@ead5e7163482:/# 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=11.3 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=45 time=12.4 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=45 time=11.3 ms
and then I was able to install wget
root@d0fb7d313577:/# apt-get install wget
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
ca-certificates libidn11 openssl
The following NEW packages will be installed:
ca-certificates libidn11 openssl wget