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.
相关推荐
草海桐1 小时前
go 的 net 包
网络·golang·net
Xiaoyu Wang14 小时前
Go协程的调用与原理
开发语言·后端·golang
techdashen1 天前
性能比拼: Go vs Java
java·开发语言·golang
听雨·眠2 天前
go中map和slice非线程安全
java·开发语言·golang
abin在路上2 天前
Golang 版本导致的容器运行时问题
云原生·golang·containerd
{⌐■_■}2 天前
【go】什么是Go语言的GPM模型?工作流程?为什么Go语言中的GMP模型需要有P?
java·开发语言·后端·golang
why1512 天前
滴滴-golang后端开发-企业事业部门-二面
开发语言·网络·golang
Ai 编码助手2 天前
用Go语言&&正则,如何爬取数据
开发语言·后端·golang
大学生亨亨2 天前
go语言八股文
笔记·golang
web守墓人2 天前
【gpt生成-其二】以go语言为例,详细讲解 并发模型:线程/协程/ Actor 实现
java·gpt·golang