centos7安装docker
1.安装docker所需要的驱动
yum install -y yum-utils device-mapper-persistent-data lvm2
2.更新yum源
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum makecache 是 将服务器上的软件包信息 现在本地缓存,以提高 搜索 安装软件的速度
yum makecache fast
3安装docker软件
yum -y install docker-ce
4.安装完毕后的命令
docker version (查看版本信息)
systemctl start docker (启动)
systemctl stop docker (停止)
systemctl status docker (查看状态)
docker run hello-world (验证是否安装成功)