docker搜索镜像出错

#搜索mysql,报错

[root@docker-node1 ~]# docker search mysql
Error response from daemon: Get https://index.docker.io/v1/search?q=mysql&n=25: dial tcp: lookup index.docker.io on 192.168.0.1:53: read udp 192.168.0.26:48396->192.168.0.1:53: i/o timeout 

#搜索nginx,报错

[root@docker-node1 ~]# docker search nginx
Error response from daemon: Get https://index.docker.io/v1/search?q=nginx&n=25: dial tcp: lookup index.docker.io on 192.168.0.1:53: read udp 192.168.0.26:38259->192.168.0.1:53: i/o timeout

解决方法 :

#添加阿里云加速器,过程省略。

#再重启服务

[root@docker-node1 ~]# systemctl daemon-reload
[root@docker-node1 ~]# systemctl restart docker

#查看状态 [root@docker-node1 ~]# systemctl status docker ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2018-06-21 08:58:03 CST; 5s ago Docs: http://docs.docker.com Main PID: 3157 (dockerd-current) CGroup: /system.slice/docker.service ├─3157 /usr/bin/dockerd-current --registry-mirror=https://alzgoonw.mirror.aliyu... └─3164 /usr/bin/docker-containerd-current -l unix:///var/run/docker/libcontaine... Jun 21 08:58:03 docker-node1 dockerd-current[3157]: time="2018-06-21T08:58:03.214795812+...s" Jun 21 08:58:03 docker-node1 dockerd-current[3157]: time="2018-06-21T08:58:03.216484251+...d" Jun 21 08:58:03 docker-node1 dockerd-current[3157]: time="2018-06-21T08:58:03.216957374+...." Jun 21 08:58:03 docker-node1 dockerd-current[3157]: time="2018-06-21T08:58:03.236891088+...e" Jun 21 08:58:03 docker-node1 dockerd-current[3157]: time="2018-06-21T08:58:03.363253224+...." Jun 21 08:58:03 docker-node1 dockerd-current[3157]: time="2018-06-21T08:58:03.369894314+...x" Jun 21 08:58:03 docker-node1 dockerd-current[3157]: time="2018-06-21T08:58:03.384817418+...n" Jun 21 08:58:03 docker-node1 dockerd-current[3157]: time="2018-06-21T08:58:03.384881999+....1 Jun 21 08:58:03 docker-node1 dockerd-current[3157]: time="2018-06-21T08:58:03.394093667+...k" Jun 21 08:58:03 docker-node1 systemd[1]: Started Docker Application Container Engine. Hint: Some lines were ellipsized, use -l to show in full.

#再搜索就成功了。 [root@docker-node1 ~]# docker search nginx INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED docker.io docker.io/nginx Official build of Nginx. 8834 [OK] docker.io docker.io/jwilder/nginx-proxy Automated Nginx reverse proxy for docker c... 1348 [OK] docker.io docker.io/richarvey/nginx-php-fpm Container running Nginx + PHP-FPM capable ... 579 [OK] docker.io docker.io/jrcs/letsencrypt-nginx-proxy-companion LetsEncrypt container to use with nginx as... 380 [OK] docker.io docker.io/kong Open-source Microservice & API Management ... 194 [OK] docker.io docker.io/webdevops/php-nginx Nginx with PHP-FPM 106 [OK] docker.io docker.io/kitematic/hello-world-nginx A light-weight nginx container that demons... 99 docker.io docker.io/bitnami/nginx Bitnami nginx Docker Image 54 [OK] docker.io docker.io/zabbix/zabbix-web-nginx-mysql Zabbix frontend based on Nginx web-server ... 54 [OK] docker.io docker.io/1and1internet/ubuntu-16-nginx-php-phpmyadmin-mysql-5 ubuntu-16-nginx-php-phpmyadmin-mysql-5 36 [OK] docker.io docker.io/linuxserver/nginx An Nginx container, brought to you by Linu... 36 docker.io docker.io/tobi312/rpi-nginx NGINX on Raspberry Pi / armhf 19 [OK] docker.io docker.io/nginxdemos/nginx-ingress NGINX Ingress Controller for Kubernetes . ... 11 docker.io docker.io/blacklabelops/nginx Dockerized Nginx Reverse Proxy Server. 9 [OK] docker.io docker.io/wodby/drupal-nginx Nginx for Drupal container image 9 [OK] docker.io docker.io/webdevops/nginx Nginx container 8 [OK] docker.io docker.io/centos/nginx-18-centos7 Platform for running nginx 1.8 or building... 6 docker.io docker.io/nginxdemos/hello NGINX webserver that serves a simple page ... 6 [OK] docker.io docker.io/1science/nginx Nginx Docker images that include Consul Te... 4 [OK] docker.io docker.io/centos/nginx-112-centos7 Platform for running nginx 1.12 or buildin... 3 docker.io docker.io/pebbletech/nginx-proxy nginx-proxy sets up a container running ng... 2 [OK] docker.io docker.io/toccoag/openshift-nginx Nginx reverse proxy for Nice running on sa... 1 [OK] docker.io docker.io/travix/nginx NGinx reverse proxy 1 [OK] docker.io docker.io/ansibleplaybookbundle/nginx-apb An APB to deploy NGINX 0 [OK] docker.io docker.io/mailu/nginx Mailu nginx frontend 0 [OK]

  

posted @ 2018-06-21 00:03  努力哥  阅读(4471)  评论(0编辑  收藏  举报