dockerComposeDownloadLink returns the URL and SHASUM-file link for docker-compose
()
| 289 | |
| 290 | // dockerComposeDownloadLink returns the URL and SHASUM-file link for docker-compose |
| 291 | func dockerComposeDownloadLink() (composeURL string, shasumURL string, err error) { |
| 292 | arch := runtime.GOARCH |
| 293 | |
| 294 | switch arch { |
| 295 | case "arm64": |
| 296 | arch = "aarch64" |
| 297 | case "amd64": |
| 298 | arch = "x86_64" |
| 299 | default: |
| 300 | return "", "", fmt.Errorf("only ARM64 and AMD64 architectures are supported for docker-compose, not %s", arch) |
| 301 | } |
| 302 | flavor := runtime.GOOS + "-" + arch |
| 303 | composerURL := fmt.Sprintf("https://github.com/docker/compose/releases/download/%s/docker-compose-%s", globalconfig.GetRequiredDockerComposeVersion(), flavor) |
| 304 | if nodeps.IsWindows() { |
| 305 | composerURL = composerURL + ".exe" |
| 306 | } |
| 307 | shasumURL = fmt.Sprintf("https://github.com/docker/compose/releases/download/%s/checksums.txt", globalconfig.GetRequiredDockerComposeVersion()) |
| 308 | |
| 309 | return composerURL, shasumURL, nil |
| 310 | } |
| 311 | |
| 312 | // CreateComposeProject creates a compose project from a string |
| 313 | func CreateComposeProject(yamlStr string) (*types.Project, error) { |
no test coverage detected