dockers compose up 报no configuration file provided: not found

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

go 复制代码
PS D:\code\GoLandProject\oneProject> docker compose up
no configuration file provided: not found

需要指定配置文件路径:

go 复制代码
PS D:\code\GoLandProject\oneProject> docker compose -f script/docker-compose.yaml up
[+] Running 1/1
 ✔ Container script-mysql8-1  Recreated                                                        

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

go 复制代码
PS D:\code\GoLandProject\oneProject\script> docker compose up                              
[+] Running 1/0
 ✔ Container script-mysql8-1  Created          

看到ready for connections.即为成功

go 复制代码
[Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.29'  socket: '/va
r/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
相关推荐
源代码•宸9 小时前
100 Go Mistakes(#4 过度使用getter和setter、#5 接口污染)
开发语言·经验分享·后端·golang
捧 花9 小时前
Go Web 开发流程
开发语言·后端·golang·restful·web·分层设计
南猿北者9 小时前
go语言基础语法
开发语言·后端·golang
落霞的思绪12 小时前
基于Go开发的矢量瓦片服务器——pg_tileserv
开发语言·后端·golang
卿雪12 小时前
Redis 数据持久化:RDB和 AOF 有什么区别?
java·数据库·redis·python·mysql·缓存·golang
巴塞罗那的风12 小时前
经典Agent架构实战之反思模型(Reflection)
后端·语言模型·golang
倔强菜鸟12 小时前
2025.11.21-GO语言入门(一)
开发语言·后端·golang
风生u12 小时前
Go: Gin的用法
golang·xcode·gin
风生u13 小时前
Go的并发(协程)
开发语言·后端·golang
米花町的小侦探13 小时前
Ubuntu安装多版本golang
linux·ubuntu·golang