1、下载 Docker Compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
#慢的话可以用这个
sudo curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

2、将可执行权限应用于二进制文件

chmod +x /usr/local/bin/docker-compose

3、创建软链

ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

4、测试

docker-compose --version

5、基础命令

# 根据yml文件启动docker
docker-compose up -d  
# 关闭容器
docker-compose down   
# 实时查看日志
docker-compose logs -f