[英]Unexpected end of file error while running docker-compose command
[英]I am working on a php docker application.Am facing an error while trying docker-compose up command
我的 docker-compose.yml 文件
version: "3.9"
services:
web:
build: .
ports:
- "5000:5000"
redis:
image: "redis:alpine"
我的錯誤:
ERROR: In file './docker-compose.yml', service 'build' must be a mapping not a string.
確保您沒有使用 TAB,而只是使用 SPACE(YAML 不支持 TABS)
此外,您的 YAML 文件中的縮進錯誤:
它應該是:
version: "3.9"
services:
web:
build: .
ports:
- "5000:5000"
redis:
image: "redis:alpine"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.