日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

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

發布時間:2024/2/28 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 关于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 format

2. 分析,這個xxx/ubuntu20.04:117486 中并沒有大寫字符,因此排查是docker image 大小寫

3. 查看docker version

[root@push26 mdc-ecdn-monitor]# docker --version Docker version 1.13.1, build 7d71120/1.13.1

證明確實是版本太低

4. 解決步驟:

卸載舊版本:

yum -y remove docker*

安裝依賴包

[root@push26 mdc-ecdn-monitor]# sudo yum install -y yum-utils Loaded 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 http://10.20.12.4/cobbler/ks_mirror/CentOS_7.9/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused" Trying other mirror. http://10.20.12.4/cobbler/ks_mirror/CentOS_7.9/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused" Trying other mirror. http://10.20.12.4/cobbler/ks_mirror/CentOS_7.9/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused" Trying other mirror. http://10.20.12.4/cobbler/ks_mirror/CentOS_7.9/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused" Trying other mirror. http://10.20.12.4/cobbler/ks_mirror/CentOS_7.9/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused" Trying other mirror. http://10.20.12.4/cobbler/ks_mirror/CentOS_7.9/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused" Trying other mirror. http://10.20.12.4/cobbler/ks_mirror/CentOS_7.9/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused" Trying other mirror. http://10.20.12.4/cobbler/ks_mirror/CentOS_7.9/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused" Trying other mirror. http://10.20.12.4/cobbler/ks_mirror/CentOS_7.9/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to 10.20.12.4:80; Connection refused" Trying other mirror. http://10.20.12.4/cobbler/ks_mirror/CentOS_7.9/repodata/repomd.xml: [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 version Nothing to do

添加鏡像信息

[root@push26 mdc-ecdn-monitor]# yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.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: http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo grabbing file http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo repo 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/docker tee /etc/docker/daemon.json <<-'EOF' {"registry-mirrors": ["https://kfwkfulq.mirror.aliyuncs.com","https://2lqq34jg.mirror.aliyuncs.com","https://pee6w651.mirror.aliyuncs.com","https://registry.docker-cn.com","http://hub-mirror.c.163.com"],"dns": ["8.8.8.8","8.8.4.4"] } EOF systemctl daemon-reload systemctl restart docker

查看最新版本

[root@push26 mdc-ecdn-monitor]# docker --version Docker version 20.10.11, build dea9396

升級ok ,問題解決

超強干貨來襲 云風專訪:近40年碼齡,通宵達旦的技術人生

總結

以上是生活随笔為你收集整理的关于centos docker版本过低导致 is not a valid repository/tag: invalid reference format的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。