关于centos docker版本过低导致 is not a valid repository/tag: invalid reference format

网友投稿 447 2022-10-23

关于centos docker版本过低导致 is not a valid repository/tag: invalid reference format

1. 在执行 docker build . --no-cache -t xxx 命令时,报Error parsing reference: "xxx/ubuntu20.04:117486 AS build" is not a valid repository/tag: invalid reference format2. 分析,这个xxx/ubuntu20.04:117486 中并没有大写字符,因此排查是docker image 大小写3. 查看docker version [root@push26 mdc-ecdn-monitor]# docker --versionDocker version 1.13.1, build 7d71120/1.13.1 证明确实是版本太低4. 解决步骤:卸载旧版本: yum -y remove docker* 安装依赖包 [root@push26 mdc-ecdn-monitor]# sudo yum install -y yum-utilsLoaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-managerThis system is not registered with an entitlement server. You can use subscription-manager to register.Loading mirror speeds from cached hostfile * base: mirrors.cn99.com * extras: mirrors.ustc.edu.cn * updates: mirrors.cn99.com[Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused"Trying other mirror.[Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused"Trying other mirror.[Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused"Trying other mirror.[Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused"Trying other mirror.[Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused"Trying other mirror.[Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused"Trying other mirror.[Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused"Trying other mirror.[Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused"Trying other mirror.[Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused"Trying other mirror.[Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused"Trying other mirror.Package yum-utils-1.1.31-54.el7_8.noarch already installed and latest versionNothing to do 添加镜像信息 [root@push26 mdc-ecdn-monitor]# yum-config-manager --add-repo Loaded plugins: fastestmirror, product-id, subscription-managerThis system is not registered with an entitlement server. You can use subscription-manager to register.adding repo from: file to /etc/yum.repos.d/docker-ce.reporepo saved to /etc/yum.repos.d/docker-ce.repo 安装docker CE [root@push26 mdc-ecdn-monitor]# yum install docker-ce docker-ce-cli containerd.io 配置国内源 mkdir -p /etc/dockertee /etc/docker/daemon.json <<-'EOF'{ "registry-mirrors": [ " " " " " ], "dns": ["8.8.8.8","8.8.4.4"]}EOFsystemctl daemon-reloadsystemctl restart docker 查看最新版本 [root@push26 mdc-ecdn-monitor]# docker --versionDocker version 20.10.11, build dea9396 升级ok ,问题解决

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:手把手教你在机器学习过程设计Python接口
下一篇:JAVA 流程控制专项精讲
相关文章

 发表评论

暂时没有评论,来抢沙发吧~