学无先后,达者为师

网站首页 编程语言 正文

【云原生】docker-compose安装,解决Warning: the “docker“ command appears to already exist on this system.3的问题

作者:别出BUG求求了 更新时间: 2023-11-13 编程语言

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.

  • sleep 20

原因:从DaoCloud上下载的docker-compose有问题,改为从GitHub上官方源码仓库下载就行了:

curl -SL https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose

原文链接:https://blog.csdn.net/weixin_39589455/article/details/129867945

  • 上一篇:没有了
  • 下一篇:没有了
栏目分类
最近更新