如何查看docker-compose.yml所在位置
查看docker-compose.yml所在位置
前提要开启docker
locate docker-compose.yml
docker-compose.yml报错
ERROR: The Compose file './docker-compose.yml' is invalid because:
Invalid top-level property "True". Valid top-level sections for this Compose file are: version, services, networks, volumes, secrets, configs, 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/

解决方案
全选复制的时候粘贴yml文件的时候可能存在丢字段的问题,我的是把顶部的版本丢了
可以分段复制粘贴。我是这样解决的
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。
相关文章
Docker搭建 Nginx+PHP+MySQL 环境并部署WordPress实践
本文给大家分享的是作者基于Docker搭建 Nginx+PHP+MySQL 环境并部署WordPress的详细过程,非常的全面,有需要的小伙伴可以参考下2017-02-02
docker 搭建基于prometheus的监控体系步骤实现
本文主要介绍了docker 搭建基于prometheus的监控体系步骤实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧2022-05-05
使用Docker run的选项以覆盖Dockerfile中的设置详解
今天小编就为大家分享一篇关于使用Docker run的选项以覆盖Dockerfile中的设置详解,小编觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随小编来看看吧2018-10-10


最新评论