Centos 8.1 安裝docker 報錯誤解決方法


安裝docket下載超時,需要將docker 網址換成國內的網址

[root@localhost yum.repos.d]#  dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
Last metadata expiration check: 0:01:12 ago on Wed 29 Apr 2020 02:41:32 PM CST.
[MIRROR] containerd.io-1.2.6-3.3.el7.x86_64.rpm: Curl error (28): Timeout was reached for https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds]
[FAILED] containerd.io-1.2.6-3.3.el7.x86_64.rpm: Curl error (28): Timeout was reached for https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds]
Curl error (28): Timeout was reached for https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds]
[root@localhost yum.repos.d]#  dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
Last metadata expiration check: 0:02:47 ago on Wed 29 Apr 2020 02:41:32 PM CST.

解決方法:換成國內的源

[root@localhost yum.repos.d]#  dnf install https://mirrors.aliyun.com/docker-ce/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm

問題2:

在centos8.1 安裝docker 執行安裝時報如下錯誤

解決方法: 

手動安裝containerd.io

[root@localhost yum.repos.d]#  dnf install https://mirrors.aliyun.com/docker-ce/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm

問題3:

通過yum 安裝完成docker執行搜索鏡像的為命令,報Cannot connect to the Docker daemon錯誤

[root@localhost yum.repos.d]# docker search centos
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

解決方法:重新加載daemon文件並重啟docker

[root@localhost yum.repos.d]# systemctl daemon-reload
[root@localhost yum.repos.d]# systemctl restart docker
[root@localhost yum.repos.d]# systemctl status docker

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM