Compose 文件规范
概述
参考:
Compose 文件是一个 YAML 格式的配置文件,Compose 将每个容器抽象为一个 service。顶层字段 service 的下级字段,用来定义该容器的名称。
一个 Docker Compose 文件中通常包含如下顶级字段:
version
指定本 yaml 依从的 compose 哪个版本制定的。
services
详见 services
networks
参考:
attachable: BOOLEAN # 该网络是否可以被其他容器加入
external: BOOLEAN # 该网络是否由外部维护。若为 true,则该网络不受本 Compose 的管理。默认值:false
name: STRING # 指定网络名称
volumes
configs
secrets
反馈
此页是否对你有帮助?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.