docker-compose: command not found

Error:

Reason:  docker-compose is not installed

Centos solves as follows:

1. Download the installation file

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


2. Give execution permission

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


3. Create a soft link

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


4. Test

docker-compose --version

Ubuntu resolves as follows:

method one:

sudo apt  install docker-compose

Execute the docker-compose -version command to check whether the installation is successful

Method Two:

1. To install the tool source, use the following command:

sudo yum -y install epel-release

2. To install the python-pip module, use the following command:

sudo yum install python-pip

3. Download the docker-compose installation package and use the following command:

wget https://github.com/docker/compose/releases/download/1.14.0-rc2/docker-compose-Linux-x86_64

4. Rename the tool docker-compose name, and move to the system executable directory, use the following command:

mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose

5. To modify the executable attribute of the file, use the command as follows:

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

Execute the docker-compose -version command to check whether the installation is successful.

Reference: Two common methods to solve the problem of docker-compose: command not found-Cloud Community-HUAWEI CLOUD

 

Guess you like

Origin blog.csdn.net/weixin_42151235/article/details/129155653