sudo: docker-compose: command not found

前端 未结 7 2164
梦谈多话
梦谈多话 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

    I will leave this here as a possible fix, worked for me at least and might help others. Pretty sure this would be a linux only fix.

    I decided to not go with the pip install and go with the github version (option one on the installation guide).

    Instead of placing the copied docker-compose directory into /usr/local/bin/docker-compose from the curl/github command, I went with /usr/bin/docker-compose which is the location of Docker itself and will force the program to run in root. So it works in root and sudo but now won't work without sudo so the opposite effect which is what you want to run it as a user anyways.

    0 讨论(0)
提交回复
热议问题