1.先检查是否安装旧版本docker
[root@registry ~]# rpm -qa|grep docker
[root@registry ~]#
我这里没有安装,如果安装,请rpm -e 卸载
2.编辑docker.repo文件,写入如下内容
[root@registry ~]# vim /etc/yum.repos.d/docker.repo
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
3.安装docker
[root@registry ~]# yum install docker-engine
4.启动docker
[root@registry ~]# systemctl start docker
[root@registry ~]# ps -ef|grep docker
root 3361 1 0 11:22 ? 00:00:00 /usr/bin/docker daemon -H fd://
root 3478 3116 0 11:22 pts/1 00:00:00 grep --color=auto d
转载于:https://blog.51cto.com/zengxh/1731629