docker-compose: install

1. Preface
Compose is a tool for Docker cluster management. You can define a multi-container application in a file, then start your application with a single command, and it will automatically resolve the container dependencies, download the image, and start the application.
Docker Compose is a tool for orchestrating Docker containers. It defines and runs multi-container applications, and can start multiple containers with one command.


Using Compose is basically divided into three steps:


Dockerfile defines the running environment
of the application docker-compose.yml defines the services that make
up the application docker-compose up Starts the entire application
 


2. Install Compose, two ways
Method 1:
Download it directly from github Note that Compose 1.8.0


requires Docker Engine 1.10.0 or later for version 2 of the Compose File format, and Docker Engine 1.9.1 or later for version 1.


# curl -L https://github.com/docker/compose/releases/download/1.8.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
# chmod +x /usr/local/bin/docker-compose


Method 2:
# 安装compose
yum -y install epel-release
yum install python-pip -y
pip install -U docker-compose


3.验证
docker-compose version

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325893212&siteId=291194637