Temporary failure in name resolution
在虚拟机中执行docker run 命令报错:docker run -d -p 3018:3000 --name testimagename/imagenameUnable to find image 'imagename/imagename:latest' locallydocker: Error response from daemon: Get https://registry-1.dock
在虚拟机中执行docker run 命令报错:
docker run -d -p 3018:3000 --name test imagename/imagename
Unable to find image 'imagename/imagename:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 127.0.0.53:53: read udp 127.0.0.1:51000->127.0.0.53:53: read: connection refused.
See 'docker run --help'.
从报错信息看应该是网络有问题,使用ping命令测试网络:
tianlang@tianlang-VirtualBox:/var/lib/mlocate$ ping registry-1.docker.io
ping: registry-1.docker.io: Temporary failure in name resolution
tianlang@tianlang-VirtualBox:/var/lib/mlocate$ ping www.baidu.com
ping: www.baidu.com: Temporary failure in name resolution
ping不通还报了错,考虑先前因为磁盘满可能造成网络服务没有启动成功,重新启动网络服务(也可以重启操作系统):
tianlang@tianlang-VirtualBox:/var/lib/mlocate$ sudo service network-manager restart
tianlang@tianlang-VirtualBox:/var/lib/mlocate$ ping www.baidu.com
PING www.a.shifen.com (14.215.177.38) 56(84) bytes of data.
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=1 ttl=54 time=9.73 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=2 ttl=54 time=8.33 ms
64 bytes from 14.215.177.38 (14.215.177.38): icmp_seq=3 ttl=54 time=10.4 ms
重启网络服务后可以正常使用.
更多推荐
所有评论(0)