sudo: docker-compose: command not found

前端 未结 7 2230
梦谈多话
梦谈多话 2020-12-25 09:56

I am trying to run docker-compose using sudo.

I have both docker and docker-compose installed on Ubuntu 16.01.

Due to an error while trying to download compo

7条回答
  •  半阙折子戏
    2020-12-25 10:18

    On Ubuntu 16.04

    Here's how I fixed this issue: Refer Docker Compose documentation

    1. sudo curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose

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

    After you do the curl command , it'll put docker-compose into the

    /usr/local/bin

    which is not on the PATH. To fix it, create a symbolic link:

    1. sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

    And now if you do: docker-compose --version

    You'll see that docker-compose is now on the PATH

提交回复
热议问题