docker-compose up -d 启动报错

来源:6-3 compose实战

点点点工程师

2019-03-31 16:53

ERROR: The Compose file './docker-compose.yml' is invalid because:

Invalid top-level property "db". Valid top-level sections for this Compose file are: services, version, networks, volumes, and extensions starting with "x-".


You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.

For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/


写回答 关注

1回答

  • 炸木沐吃
    2019-04-02 23:04:33

    .yml文件里面version是不是错了,写得几啊?

Docker入门

再不学点Docker你就out啦!

96683 学习 · 242 问题

查看课程

相似问题