1、加入Docker的安装源:
# vim /etc/yum.repos.d/docker.repo
编辑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
退出保存
# :wq!
2、yum安装docker
# yum -y install docker-engine
3、安装结束后,启动docker
# systemctl start docker.service
4、设置docker开启启动
# systemctl enable docker.service
网友评论