当前位置:   article > 正文

dockers compose up 报no configuration file provided: not found

dockers compose up 报no configuration file provided: not found

如果docker-compose文件不在当前路径的下一级:

PS D:\code\GoLandProject\oneProject> docker compose up
no configuration file provided: not found
  • 1
  • 2

需要指定配置文件路径:

PS D:\code\GoLandProject\oneProject> docker compose -f script/docker-compose.yaml up
[+] Running 1/1
 ✔ Container script-mysql8-1  Recreated                                                        
  • 1
  • 2
  • 3

或者直接在例子中的script目录执行

PS D:\code\GoLandProject\oneProject\script> docker compose up                              
[+] Running 1/0
 ✔ Container script-mysql8-1  Created          
  • 1
  • 2
  • 3

看到ready for connections.即为成功

[Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.29'  socket: '/va
r/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
  • 1
  • 2
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/302218
推荐阅读
相关标签
  

闽ICP备14008679号