(ctx context.Context, extraArgs ...string)
| 118 | } |
| 119 | |
| 120 | func (dc *DockerCompose) Wrapper(ctx context.Context, extraArgs ...string) error { |
| 121 | args := []string{ //nolint:prealloc |
| 122 | "compose", |
| 123 | "--project-directory", dc.workingDir, |
| 124 | "-f", dc.filepath, |
| 125 | "-p", dc.projectName, |
| 126 | } |
| 127 | args = append(args, extraArgs...) |
| 128 | |
| 129 | cmd := exec.CommandContext( |
| 130 | ctx, |
| 131 | "docker", |
| 132 | args..., |
| 133 | ) |
| 134 | cmd.Stdout = os.Stdout |
| 135 | cmd.Stderr = os.Stderr |
| 136 | |
| 137 | if err := cmd.Run(); err != nil { |
| 138 | return fmt.Errorf("failed to run docker compose: %w", err) |
| 139 | } |
| 140 | |
| 141 | return nil |
| 142 | } |
| 143 | |
| 144 | func (dc *DockerCompose) ApplyMetadata(ctx context.Context, endpoint string) error { |
| 145 | cmd := exec.CommandContext( //nolint:gosec |
no test coverage detected