centos7 install docker
1,查看内核版本
uname -r
2,卸载老版本
yum remove -y docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
3,安装必要组件
yum install -y yum-utils device-mapper-persistent-data lvm2
4,安装仓库
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
5,安装docker-ce
yum install -y docker-ce
6,启动docker
systemctl start docker
7,开机自启动
systemctl enable docker