docker-compose 对应的容器是否运行
(ctx context.Context, cli *client.Client, workingDir string, serviceNames []string)
| 276 | |
| 277 | // docker-compose 对应的容器是否运行 |
| 278 | func 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 | // 获取容器的名称 |
| 291 | func getDevContainerName(dockerComposeContainers []DockerComposeContainer, devServiceName string) string { |
no test coverage detected