docker安装
安装docker工具
yum install -y yum-utils \ device-mapper-persistent-data \ lvm2
阿里云安装
yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
安装docker版本
yum install docker-ce
查看版本
docker -v
启动和设置开机启动
systemctl start dokcer
systemctl enable docker
docker-compose安装
阿里云安装
curl -L https://get.daocloud.io/docker/compose/releases/download/1.24.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
给docker-compose设置权限
chmod +x /usr/local/bin/docker-compose
查看docker-compose版本
docker-compose --version