docker拉取mysql镜像速度很慢

原创 2018年04月17日 17:51:31

1. 直接通过docker拉取镜像遇到的问题:熟悉的timeout!!!

sysuygm@sysuygm:~$ docker pull mysql:5.7
5.7: Pulling from library/mysql
85b1f47fba49: Pulling fs layer 
5671503d4f93: Download complete 
3b43b3b913cb: Download complete 
4fbb803665d0: Waiting 
05808866e6f9: Waiting 
1d8c65d48cfa: Waiting 
e189e187b2b5: Waiting 
02d3e6011ee8: Waiting 
2d0f3914273e: Waiting 
b7de9fbb86ba: Waiting 
error pulling image configuration: Get https://registry-1.docker.io/v2/library/mysql/blobs/sha256:dd0afb9bc4a99c70cdda8002ef2f1816405a795ee28faa0debd633f3380f8c4c: dial tcp 34.225.121.244:443: i/o timeout

sysuygm@sysuygm:~$ docker pull mysql:5.7
Error response from daemon: Get https://registry-1.docker.io/v2/library/mysql/manifests/5.7: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fmysql%3Apull&service=registry.docker.io: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

sysuygm@sysuygm:~$ docker pull mysql:5.7
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

sysuygm@sysuygm:~$ docker pull mysql:5.7
5.7: Pulling from library/mysql
Get https://registry-1.docker.io/v2/library/mysql/manifests/sha256:94ed2fa3857cc98ec8d680aedfd5a05ea5a3ea954f062edbdc0443d0f53a428e: dial tcp 54.152.209.167:443: i/o timeout

sysuygm@sysuygm:~$ docker pull mysql:5.7
Error response from daemon: Get https://registry-1.docker.io/v2/library/mysql/manifests/5.7: dial tcp 34.200.28.105:443: i/o timeout

sysuygm@sysuygm:~$ docker pull mysql:5.7
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

sysuygm@sysuygm:~$ docker pull mysql:5.7
Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

sysuygm@sysuygm:~$ docker pull mysql:5.7
Error response from daemon: Get https://registry-1.docker.io/v2/library/mysql/manifests/5.7: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fmysql%3Apull&service=registry.docker.io: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36

2. 通过国内镜像daocloud.io/library库下载,下载速度快到感人!

sysuygm@sysuygm:~$     docker pull daocloud.io/library/centos:latest
latest: Pulling from library/centos
d9aaf4d82f24: Downloading [>                                                  ]  526.4kB/73.39MB
^C
sysuygm@sysuygm:~$  docker pull daocloud.io/library/mysql:5.7
5.7: Pulling from library/mysql
85b1f47fba49: Pull complete 
5671503d4f93: Pull complete 
3b43b3b913cb: Pull complete 
4fbb803665d0: Pull complete 
05808866e6f9: Pull complete 
1d8c65d48cfa: Pull complete 
e189e187b2b5: Pull complete 
02d3e6011ee8: Pull complete 
d43b32d5ce04: Pull complete 
2a809168ab45: Pull complete 
Digest: sha256:a0423a7d021b7a7775f1d2db1014bd15fde029f538c1f8d97c9832aa4a25209f
Status: Downloaded newer image for daocloud.io/library/mysql:5.7

sysuygm@sysuygm:~$ docker images
REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
hello-world                 latest              f2a91732366c        2 weeks ago         1.85kB
daocloud.io/library/mysql   5.7                 5709795eeffa        5 weeks ago         408MB
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23

需要注意的是:mysql镜像名的前缀不能忘记,否则报错! 
完整的名字: daocloud.io/library/mysql:5.7

sysuygm@sysuygm:~$ docker run -p 3306:3306 --name mysql2 -e MYSQL_ROOT_PASSWORD=root -d mysql:5.7
Unable to find image 'mysql:5.7' locally

docker: Error response from daemon: Get https://registry-1.docker.io/v2/library/mysql/manifests/5.7: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fmysql%3Apull&service=registry.docker.io: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.
sysuygm@sysuygm:~$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

sysuygm@sysuygm:~$ docker run -it --net host daocloud.io/library/mysql:5.7 "sh"
# mysql -h127.0.0.1 -P3306 -uroot -proot
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.20 MySQL Community Server (GPL)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_37674858/article/details/79978337

Centos7安装docker仓库Harbor

1.安装docker//安装常用组件包yum install -y yum-utils  device-mapper-persistent-data  lvm2//配置docker的yum源yum-c...
  • liuyunshengsir
  • liuyunshengsir
  • 2018-04-17 16:30:54
  • 15

docker配置centos镜像拉取缓慢

http://www.cnblogs.com/anliven/p/6217418.html
  • dwl764457208
  • dwl764457208
  • 2017-03-13 15:09:16
  • 706

如何更快的拉取国内的docker镜像

由于国内访问直接访问Docker hub网速比较慢,拉取镜像的时间就会比较长。一般我们会使用镜像加速或者直接从国内的一些平台镜像仓库上拉取。 使用比较多的是: daocloud镜像市场:http...
  • liujingqiu
  • liujingqiu
  • 2017-07-08 16:12:46
  • 2118

【Docker加速】- 解决docker pull镜像速度慢的问题

解决docker pull镜像速度慢的问题 直接下载Docker镜像时,由于种种原因,经常下载失败,即使连接成功也是很慢,怎么办呢 目前我知道可以提升速度的办法:DaoCloud 提供Dock...
  • shenzhen_zsw
  • shenzhen_zsw
  • 2017-07-03 22:52:59
  • 5904

Docker镜像拉取加速

每次装新机器总要登陆阿里云然后贴出来,这里留下做个备份1.ubuntu安装/升级你的Docker客户端推荐安装1.6.0以上版本的Docker客户端。您可以通过阿里云的镜像仓库下载:mirrors.a...
  • Becivells
  • Becivells
  • 2017-03-15 14:54:02
  • 2172

解决Docker pull镜像速度过慢的问题

目前,Docker拥有中国的官方镜像,具体内容可访问https://www.docker-cn.com/registry-mirror在使用时,Dock...
  • eva001206130
  • eva001206130
  • 2018-03-30 10:29:23
  • 109

docker拉取镜像慢的解决方案

在阿里或者网易的镜像仓库注册账号,获得专属加速地址 进入下面的文件,更改配置 /etc/docker/daemon.json 'EOF'{ "registry-mirrors": ["htt...
  • xinianzhongliu
  • xinianzhongliu
  • 2018-01-16 10:53:06
  • 72

Docker镜像的获取与使用

镜像的获取与容器的使用 镜像可以看作是包含有某些软件的容器系统,比如centos就是一个官方的基础镜像,很多镜像都是基于这个镜像“衍生”,该镜像包含基本的centos系统...
  • smile_bestSun
  • smile_bestSun
  • 2016-12-21 15:52:45
  • 16490

如何使用DockerHub官方的mysql镜像生成容器

一、下载官方的mysql镜像 docker pull mysql11 下载完成后查看镜像: [root@localhost mysql_data]# docker images REPOSITORY ...
  • xuguokun1986
  • xuguokun1986
  • 2016-07-12 10:24:58
  • 466

使用docker命令拉取镜像包以及升级yml文件

1.先进入yml文件的对应目录下 docker cd /目录名/目录名/ 2.查找对应的包名 (可以使用模糊查询) docker service ls |grep 包名 3.如...
  • liulu164212
  • liulu164212
  • 2017-11-08 23:21:35
  • 168
收藏助手
不良信息举报
您举报文章:docker拉取mysql镜像速度很慢
举报原因:
原因补充:

(最多只允许输入30个字)