Centos7安装docker最新版

安装指定版本得docker,可以链接到如下

https://www.jianshu.com/p/d9dbf7e23722    

------------------------------------------------------------------------------------

Centos7安装docker

yum update

# vim /etc/yum.repos.d/docker.repo

//添加以下内容

[dockerrepo]

name=Docker Repository

baseurl=https://yum.dockerproject.org/repo/main/centos/7/

enabled=1

gpgcheck=1

gpgkey=https://yum.dockerproject.org/gpg


# yum install docker-engine -y


如果安装时候遇到报错如下

yum install 出现 Transaction Check Error:

给出centos7下的卸载docker的命令

yum list installed | grep docker

yum -y remove 上述命令下的输出结果如

[root@VM_116_112_centos lib]# yum list installed | grep docker

docker.x86_64 1.10.3-46.el7.centos.14 @extras

docker-common.x86_64 1.10.3-46.el7.centos.14 @extras

docker-selinux.x86_64 1.10.3-46.el7.centos.14 @extras

yum -y remove docker.x86_64

yum -y remove docker-common.x86_64

yum -y remove docker-selinux.x86_64

就OK了

卸载成功之后 重新执行

# yum install docker-engine -y  

安装完毕 启动docker

systemctl start docker

你可能感兴趣的:(Centos7安装docker最新版)