I. Introduction
Compose tools for defining and running multiple applications Docker containers, docker service orchestration tool is mainly applied to complex applications built on the Docker, Compose managed by a plurality of containers docker profile suitable combination of a plurality of containers a scene development.
Use compose, you can use yaml file to configure service applications.
Then, by a command, you can create and start all services from the configuration.
Official website: https: //docs.docker.com/compose/overview/
Second, the use
compose for all environments: production, development, testing and CI workflow.
Use compose basically a three-step process:
1. dockerfile, or custom application environments mirror to replicate anywhere.
2. The definition of applications in service composition docker-compose.yml so that they can run together in a separate environment.
3. Run docker compose up up and running the entire application.
Third, the installation docker-ce
First, install docker
1, the installation dependent on the environment
[root@jenkins ~]# yum -y install yum-utils device-mapper-persistent-data lvm2
2. Preparation mirror source
[root@jenkins ~]# curl https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo
3, mounting docker-ce
[root@jenkins ~]# yum -y install docker-ce
4. Start docker
[root@docker ~]# docker version #查看docker版本
Docker for the user of the client version greater than 1.10.0
You can modify the daemon configuration file /etc/docker/daemon.json to use accelerator
{
"Registry-Mirrors": [ "HTTPS: // you aliyun mirror accelerator .com"]
}
the EOF
[root @ docker ~] # systemctl restart docker # restart the service
anaconda-ks.cfg docker-compose
docker-compose version 1.21.1, build 5a3f1a3