阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

docker pull centos慢问题的解决方案

175次阅读
没有评论

共计 937 个字符,预计需要花费 3 分钟才能阅读完成。

1. 现象

如果直接 docker pull CentOS 两个小时才 down 下来 8M,很慢

2. 解决

[root@localhost network-scripts]# cd /etc/docker
[root@localhost docker]# ls
certs.d  daemon.json  key.json  seccomp.json
[root@localhost docker]# cat daemon.json
{}
[root@localhost docker]# vi daemon.json

{
“registry-mirrors”: [“https://mj9kvemk.mirror.aliyuncs.com”]
}

重启 docker

[root@localhost docker]# service docker restart
Redirecting to /bin/systemctl restart docker.service
[root@localhost docker]#

重新拉取,秒秒钟

[root@localhost docker]# docker pull centos
Using default tag: latest
Trying to pull repository docker.io/library/centos …
latest: Pulling from docker.io/library/centos
8ba884070f61: Pull complete
Digest: sha256:8d487d68857f5bc9595793279b33d082b03713341ddec91054382641d14db861
Status: Downloaded newer image for docker.io/centos:latest
[root@localhost docker]#

 3. 验证

[root@localhost docker]# docker images
REPOSITORY          TAG                IMAGE ID            CREATED            SIZE
docker.io/centos    latest              9f38484d220f        10 days ago        202 MB
[root@localhost docker]#

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-21发表,共计937字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中