Steps and methods of installing docker-compose under Linux system

1. Preface: docker-compose is used to create containers to achieve the effect of multi-container management.

Second, the steps (this article is only for the linux environment, the actual test environment is centos7&8)

It is relatively simple to install docker-compose under the linux system. There are two main ways. The following are recorded separately:

1. Install directly online, the command is as follows:

curl -L https://get.daocloud.io/docker/compose/releases/download/1.26.2/docker-compose-'uname -s'-'uname -m' > /usr/local/bin/docker-compose

After the installation is complete, you need to give docker-compose file permissions, the command is as follows:

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

Check whether the installation is successful, the command is as follows:

docker-compose -v

2. Use python-pip to install docker-compose, the command is as follows:

yum -y install epel-release

yum -y install python-pip

pip install docker-compose

After the installation is complete, check whether the installation is successful, the command is as follows:

docker-compose version

 

Guess you like

Origin blog.csdn.net/joyksk/article/details/111585728
Recommended