ryankurte / docker-rpi-emu

QEMU and helper scripts in a docker container for emulating a raspberry pi environment
MIT License
109 stars 34 forks source link

Temporary failure in name resolution #20

Open AdityaGovardhan opened 5 years ago

AdityaGovardhan commented 5 years ago

I am trying to clone some github repos. This worked fine on my home workstation but failing on my office workstation. I am unable to figure out how it is related to DNS. Thank you.

adi@adi:~/ryankurte-docker-qemu-rpi$ ls
2019-07-10-raspbian-buster-lite.img
adi@adi:~/ryankurte-docker-qemu-rpi$ docker run -it --rm --privileged=true -v /home/adi/ryankurte-docker-qemu-rpi:/usr/rpi/images -w /usr/rpi --dns 8.8.8.8 ryankurte/docker-rpi-emu /bin/bash
root@292bdbfae9f3:/usr/rpi# ./run.sh images/2019-07-10-raspbian-buster-lite.img 
Attempting to mount images/2019-07-10-raspbian-buster-lite.img to /media/rpi
Attached base loopback at: /dev/loop17
Located partitions: p1 (/boot) at 8192 and p2 (/) at 540672
Closed loopback /dev/loop17
Mounted to /media/rpi and /media/rpi/boot
Bootstrapping Qemu
root@292bdbfae9f3:/# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.2  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:ac:11:00:02  txqueuelen 0  (Ethernet)
        RX packets 26  bytes 3113 (3.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@292bdbfae9f3:/# ping www.google.com
ping: www.google.com: Temporary failure in name resolution
root@292bdbfae9f3:/# exit
exit
root@292bdbfae9f3:/usr/rpi# exit
exit
adi@adi:~/ryankurte-docker-qemu-rpi$ 
airfield20 commented 3 years ago

I also have this issue

airfield20 commented 3 years ago

turns out it was my /etc/resolv.conf file just changed file contents to 8.8.8.8 and it worked fine without rebooting or restarting network services.