linux安装docker compose

当编写好docker-compose.yml,运行docker-compose up命令时,可能会报如下错误

docker-compose: line 1: {error:Not Found}: command not found

这种情况是因为尚未安装docker compose对缘故。可以根据下面命令进行手动安装。

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

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

具体细节可以参考官网文档

    原文作者:猪小膘
    原文地址: https://segmentfault.com/a/1190000019588383
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞