docker拉取centos镜像问题

error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/9f/9f38484d220fa527b1fb19747638497179500a1bed8bf0498eb788229229e6e1/data?verify=1562656042-1tHuVwup3srsvRCK9suHckPf0nU%3D: dial tcp 104.18.125.25:443: i/o timeout

因为原来的仓库中没有这个镜像,so modify it

vim /etc/docker/daemon.json

https://docker.mirrors.ustc.edu.cn
https://nrbewqda.mirror.aliyuncs.com
https://dmmxhzvq.mirror.aliyuncs.com
{
"registry-mirrors":["https://docker.mirrors.ustc.edu.cn","https://nrbewqda.mirror.aliyuncs.com"]
}

在这里插入图片描述
修改完以后别忘了重启docker

systemctl stop docker
systemctl start docker

最后再次:

docker pull centos:7

中文centos镜像制作

如果你需要用这个镜像,我建议自己再 build 一下,因为默认镜像中的中文是乱码的,你看日志都是。。

1.新建一个 Dockerfile 文件

FROM centos:7
#设置系统编码
RUN yum install kde-l10n-Chinese -y
RUN yum install glibc-common -y
RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
ENV LC_ALL zh_CN.UTF-8

2.构建

docker build -t 'centos-zh' .

complete

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值