mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-11 04:14:38 +00:00
Expand Compose introduction and value proposition
This commit is contained in:
@@ -12,6 +12,10 @@
|
||||
|
||||
### 11.1.1 概述
|
||||
|
||||
Docker Compose 让用户能够以声明式方式定义和管理多容器应用。它的核心价值在于:用一个 YAML 文件取代一连串手动的 `docker run` 命令,使得复杂应用的启动、停止和重建变得一键可达。
|
||||
|
||||
对于开发团队而言,Compose 解决了三个关键问题:环境一致性("在我机器上能跑"的问题)、服务依赖管理(确保数据库在应用之前启动)、以及开发-测试-生产的配置差异管理(通过 `compose.override.yaml` 实现多环境适配)。
|
||||
|
||||
### 11.1.2 模板文件规范
|
||||
|
||||
Compose 模板文件采用 YAML 格式,扩展名为 `.yml` 或 `.yaml`。
|
||||
|
||||
Reference in New Issue
Block a user