码迷,mamicode.com
首页 > 其他好文 > 详细

使用docker pull从镜像仓库拉取镜像时报错

时间:2018-12-22 11:46:02      阅读:1523      评论:0      收藏:0      [点我收藏+]

标签:dock   工具   hosts   udp   read   try   get   14.   结果   

[root@CentOS ~]# docker pull centos
Using default tag: latest
Trying to pull repository docker.io/library/centos ...
Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 119.29.29.29:53: read udp 192.168.100.100:59205->119.29.29.29:53: i/o timeout

解决办法:
[root@CentOS etc]# yum install bind-utils // 安装dig工具
[root@CentOS etc]# dig @114.114.114.114 registry-1.docker.io

选择上面命令执行结果中的一组解析放到本机的/etc/hosts文件里做映射
[root@CentOS etc]# vim /etc/hosts

54.175.43.85 registry-1.docker.io
接着再进行docker pull镜像下载操作

使用docker pull从镜像仓库拉取镜像时报错

标签:dock   工具   hosts   udp   read   try   get   14.   结果   

原文地址:https://www.cnblogs.com/mrrr/p/10153980.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!