解决docker pull ubuntu报错
问题:docker pull ubuntu报错
[root@Centos1 ~]# docker pull ubuntu latest: Pulling from ubuntu 0849d1d6d069: Pull complete 0849d1d6d069: Pulling fs layer efe9b9ee6f80: Download complete eb51cd05edf7: Download complete a177d12adaa2: Download complete Pulling repository ubuntulayer Get https://index.docker.io/v1/repositories/library/ubuntu/images: EOF
解决方案:
1.执行命令:yum install bind-utils 工具
2.执行命令:dig @114.114.114.114 registry-1.docker.io
[root@Centos1 ~]# dig @114.114.114.114 registry-1.docker.io ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.68.rc1.el6_10.3 <<>> @114.114.114.114 registry-1.docker.io ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15638 ;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;registry-1.docker.io. IN A ;; ANSWER SECTION: registry-1.docker.io. 33 IN A 3.226.66.79 registry-1.docker.io. 33 IN A 3.221.133.86 registry-1.docker.io. 33 IN A 34.197.189.129 registry-1.docker.io. 33 IN A 34.199.77.19 registry-1.docker.io. 33 IN A 34.199.40.84 registry-1.docker.io. 33 IN A 3.224.75.242 registry-1.docker.io. 33 IN A 3.224.11.4 registry-1.docker.io. 33 IN A 34.201.196.144 ;; Query time: 56 msec ;; SERVER: 114.114.114.114#53(114.114.114.114) ;; WHEN: Sat Nov 23 16:53:24 2019 ;; MSG SIZE rcvd: 166
3.vi /etc/hosts
将3.221.133.86 registry-1.docker.io追加在配置文件中
[root@Centos1 ~]# vi /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.2.128 Centos1 192.168.2.129 Centos2 192.168.2.130 Centos3 3.221.133.86 registry-1.docker.io
4.docker pull ubuntu
[root@Centos1 ~]# docker pull ubuntu latest: Pulling from ubuntu e860e2382707: Pull complete efe9b9ee6f80: Pull complete eb51cd05edf7: Pull complete a177d12adaa2: Pull complete a177d12adaa2: Pulling fs layer Digest: sha256:44ed9bfa3f850417f4036afc34ce97559c464c708a9b42f8be14392921e8bc42 Status: Downloaded newer image for ubuntu:latest
5.docker images 验证是否成功
[root@Centos1 ~]# docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE <none> <none> b698458a3d6b 51 minutes ago 273.5 MB debian latest 97b9b3e4e792 18 hours ago 114 MB ubuntu latest a177d12adaa2 3 weeks ago 64.19 MB <none> <none> ac5bce8377e2 5 weeks ago 55.65 MB centos latest d97a52facc3f 7 weeks ago 219.5 MB registry latest f99738109191 8 months ago 25.76 MB [root@Centos1 ~]#
善于跌倒仍喜爱奔跑~

浙公网安备 33010602011771号