示例输入与设置
services:
web:
image: nginx
ports:
- "8080:80"检查 Compose YAML 语法、services 结构并汇总服务。
YAML 校验 · 服务结构检查粘贴 Compose YAML,检查是否存在非空 services 映射,并查看每项服务的 image 或 build 摘要。通过表示基础结构可读取,不会拉取镜像或启动容器,也不等同于完整 Compose 规范校验。
先用下面的示例确认输入格式和选项,再处理自己的数据。示例中的随机值、文件大小和展示格式会随输入与设置变化。
services:
web:
image: nginx
ports:
- "8080:80"services → web
image → nginx