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

Function isRemoteDockerComposeRunning

cli/cmd/start/vm.go:464–477  ·  view source on GitHub ↗

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

(sshRemote common.SSHRemote, workingDir string, serviceNames []string)

Source from the content-addressed store, hash-verified

462
463// docker-compose 对应的容器是否运行
464func isRemoteDockerComposeRunning(sshRemote common.SSHRemote, workingDir string, serviceNames []string) (isDockerComposeRunning bool, err error) {
465 isDockerComposeRunning = false
466
467 remoteContainers, err := GetRemoteContainersWithServices(sshRemote, workingDir, serviceNames)
468 if err != nil {
469 return isDockerComposeRunning, err
470 }
471 if len(remoteContainers) > 0 {
472 common.SmartIDELog.Info(i18nInstance.Start.Warn_docker_container_started)
473 isDockerComposeRunning = true
474 }
475
476 return isDockerComposeRunning, err
477}
478
479// git 相关操作
480func GitCloneAndCheckoutBranch(sshRemote common.SSHRemote, workspaceInfo workspace.WorkspaceInfo, cmd *cobra.Command) error {

Callers 1

ExecuteVmStartCmdFunction · 0.85

Calls 2

InfoMethod · 0.80

Tested by

no test coverage detected