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

 

posted @ 2020-04-29 15:02  彦祚  阅读(3191)  评论(0编辑  收藏  举报