A, Docker-Compose Profile
Docker Docker-Compose official project is an open source project, responsible for fast layout of Docker container cluster.
Docker-Compose will be managed by a container divided into three levels, namely the project (project), service (service) and container (container). A project which may comprise a plurality of services, each defined image container runs, parameters dependent. Which may comprise a plurality of containers service instances.
At work, often encounter case to complete a task requiring multiple containers with each other. For example, to implement a Web project, in addition to Web services container itself, often also need to add the back-end database services container, even including load balancing containers.
Compose application allows the user to define a group of containers associated by a single docker-compose.yml template file (YAML format) for a project (project).
Two, Docker-Compose installation
2.1 binaries are installed:
Download Docker-Compose:
sudo curl -L https://github.com/docker/compose/releases/download/1.23.0-rc3/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
Increase the executable permissions
sudo chmod +x /usr/local/bin/docker-compose
View version
docker-compose version
2.2 pip install
Installation pip
yum -y install epel-release yum -y install python-pip
View edition
pip --version
Update pip
pip install --upgrade pip
Installation docker-compose
pip install docker-compose
View version
docker-compose version
Third, the installation completion tool
In order to facilitate input commands can also be installed Docker completions tools help to quickly enter the command prompt:
yum install bash-completion
Download docker-compose scripts
curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose
Fourth, uninstall
4.1 binaries Uninstall
sudo rm /usr/local/bin/docker-compose
4.2 pip uninstall
sudo pip uninstall docker-compose