1. 对应版本
https://docs.docker.com/compose/compose-file/compose-file-v3/
参考:https://github.com/docker/compose/releases
2. 安装
国内源安装(不推荐):
curl -L http://get.daocloud.io/docker/compose/releases/download/v2.2.3/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
查看版本:
docker-compose --version
卸载
rm usr/local/bin/docker-compose
3. 问题排查
出现以下问题:
Executing docker install script, commit: 93bb55b16a5f5c8ce33e0f4784cb8af149d9590f Warning: the “docker” command
appears to already exist on this system.
If you already have Docker installed, this script can cause trouble,
which is why we’re displaying this warning and provide the opportunity
to cancel the installation.If you installed the current Docker package using this script and are
using it again to update Docker, you can safely ignore this message.You may press Ctrl+C now to abort this script.文章来源:https://www.toymoban.com/news/detail-408880.html
- sleep 20
原因:从DaoCloud上下载的docker-compose有问题,改为从GitHub上官方源码仓库下载就行了:文章来源地址https://www.toymoban.com/news/detail-408880.html
curl -SL https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
到了这里,关于【云原生】docker-compose安装,解决Warning: the “docker“ command appears to already exist on this system.3的问题的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!