step1: 执行如下命令(下载的时间稍长)
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
uname -s/-m 结果示例
step2: 修改权限
sudo chmod +x /usr/local/bin/docker-compose
step3: 测试一下是否安装成功
docker-compose --version
参考
- https://docs.docker.com/compose/install/(官方文档中还介绍了 Upgrading 和 Uninstallation)