docker_practice/compose/intro.md

11 lines
654 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

## 简介
Compose 项目目前在 [Github](https://github.com/docker/compose) 上进行维护,目前最新版本是 1.2.0。
Compose 定位是“defining and running complex applications with Docker”前身是 Fig兼容 Fig 的模板文件。
Dockerfile 可以让用户管理一个单独的应用容器;而 Compose 则允许用户在一个模板YAML 格式)中定义一组相关联的应用容器(被称为一个 `project`,即项目),例如一个 Web 服务容器再加上后端的数据库服务容器等。
![](../_images/docker_compose.jpg)
该项目由 Python 编写,实际上调用了 Docker 提供的 API 来实现。