Centos7、8安装docker和docker-compose
1.安装docker
# 使用yum安装docker
yum -y install docker
# 启动
systemctl start docker.service
# 设置为开机自启动
systemctl enable docker.service
2.安装docker-compose
具体安装哪个版本的docker-compose可以去github查看
https://github.com/docker/compose/releases
# 下载docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# 增加可执行权限
sudo chmod +x /usr/local/bin/docker-compose
# 查看docker-compose版本
docker-compose --version