centos 7 安装docker
1.卸载旧版本 # yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine 2.安装依赖包 # yum install -y yum-utils device-mapper-persistent-data lvm2 3.设置yum源 # yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo 4.安装docker-ce # yum install docker-ce docker-ce-cli containerd.io 5.启动docker并且加入开机启动 # systemctl start docker # systemctl enable docker 6.查看docker状态 # systemctl status docker 7.验证是否安装成功 # docker --version