在线安装Docker Compose
程序员文章站
2022-05-14 22:55:30
...
安装过程
# 下载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
# 创建soft link
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
# 验证是否安装成功
docker-compose --version
# 验证sudo下docker-compose命令
sudo docker-compose --version
警告: 不创建soft link会导致sudo docker-compose失败,导致sudo ./install.sh安装Harbor时报错“Need to install docker-compose…"