Docker - dial tcp: lookup index.docker.io: no such host - Solution

1. Symptoms

While using Docker a user is unable to perform tasks such as pull new image or search for new images while the following error message appears:
# docker pull debian:8
Pulling repository debian
FATA[0053] Get https://index.docker.io/v1/repositories/library/debian/images: dial tcp: lookup index.docker.io: no such host

2. Solution

While this is a randomly occurring error it is frequently linked to a DNS resolution query by docker services. First, make sure you are running up to date docker installation. If this does not resolve your issue then try to resolve this error by restarting your docker service:
# service docker restart
Redirecting to /bin/systemctl restart  docker.service
In case that you are unable to restart your docker service at a present time you my try to temporarily resolve this issue by including the IP address of the host in question eg.  index.docker.io  to your  /etc/hosts  file. Resolve the IP address:
# dig index.docker.io +noall +answer +nocomments

; <<>> DiG 9.9.4-P2-RedHat-9.9.4-18.P2.fc20 <<>> index.docker.io +noall +answer +nocomments
;; global options: +cmd
index.docker.io.        30      IN      A       162.242.195.84
Next, include the IP address to your system's  /etc/hosts  file:
# echo '162.242.195.84 index.docker.io' >> /etc/hosts
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值