MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / isDockerComposeRunning

Function isDockerComposeRunning

cli/cmd/start/local.go:278–288  ·  view source on GitHub ↗

docker-compose 对应的容器是否运行

(ctx context.Context, cli *client.Client, workingDir string, serviceNames []string)

Source from the content-addressed store, hash-verified

276
277// docker-compose 对应的容器是否运行
278func isDockerComposeRunning(ctx context.Context, cli *client.Client, workingDir string, serviceNames []string) bool {
279 isDockerComposeRunning := false
280
281 dockerComposeContainers := GetLocalContainersWithServices(ctx, cli, workingDir, serviceNames)
282 if len(dockerComposeContainers) > 0 {
283 common.SmartIDELog.Info(i18nInstance.Start.Warn_docker_container_started)
284 isDockerComposeRunning = true
285 }
286
287 return isDockerComposeRunning
288}
289
290// 获取容器的名称
291func getDevContainerName(dockerComposeContainers []DockerComposeContainer, devServiceName string) string {

Callers 1

ExecuteStartCmdFunction · 0.85

Calls 2

InfoMethod · 0.80

Tested by

no test coverage detected