-
安装数据存储驱动包
yum install -y yum-utils device-mapper-persistent-data lvm2
-
添加阿里安装源
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
-
自动检测哪个安装源快
yum makecache fast
-
安装docker服务(服务器和客户端都会安装)
yum -y install docker-ce
-
启动docker服务
service docker start
-
查看docker版本
docker version
-
拉取
hello-world
镜像docker pull hello-world
-
启动
hello-world
容器docker run hello-world