1、查看系统版本
cat /etc/centos-release
CentOS Linux release 7.5.1804 (Core)
uname -r
3.10.0-862.el7.x86_64
2、安装yum源
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
如果找不到yum-config-manager:yum -y install yum-utils
3、更新源
yum makecache
4、安装docker-ce
yum install -y docker-ce
5、启动和停止服务
systemctl start docker
systemctl stop docker
采用官方方式安装compose
https://www.imooc.com/article/22933