findDdevSSHAuth uses FindContainerByLabels to get our sshAuth container and return it (or nil if it doesn't exist yet)
()
| 187 | // findDdevSSHAuth uses FindContainerByLabels to get our sshAuth container and |
| 188 | // return it (or nil if it doesn't exist yet) |
| 189 | func findDdevSSHAuth() (*container.Summary, error) { |
| 190 | containerQuery := map[string]string{ |
| 191 | "com.docker.compose.project": SSHAuthName, |
| 192 | "com.docker.compose.oneoff": "False", |
| 193 | } |
| 194 | |
| 195 | c, err := dockerutil.FindContainerByLabels(containerQuery) |
| 196 | if err != nil { |
| 197 | return nil, fmt.Errorf("failed to execute findContainersByLabels, %v", err) |
| 198 | } |
| 199 | return c, nil |
| 200 | } |
| 201 | |
| 202 | // RenderSSHAuthStatus returns a user-friendly string showing sshAuth-status |
| 203 | func RenderSSHAuthStatus() string { |
no test coverage detected