@@ -3,8 +3,6 @@ package wrapper
3
3
import (
4
4
"bytes"
5
5
"errors"
6
- "fmt"
7
- "os"
8
6
"os/exec"
9
7
)
10
8
@@ -28,17 +26,17 @@ func NewComposeWrapper(binaryPath string) (*ComposeWrapper, error) {
28
26
}
29
27
30
28
// Up create and start containers
31
- func (wrapper * ComposeWrapper ) Up (filePath , url , projectName , envFilePath , configPath string ) ([]byte , error ) {
32
- return wrapper .Command (newUpCommand (filePath ), url , projectName , envFilePath , configPath )
29
+ func (wrapper * ComposeWrapper ) Up (filePath , url , projectName , envFilePath string ) ([]byte , error ) {
30
+ return wrapper .Command (newUpCommand (filePath ), url , projectName , envFilePath )
33
31
}
34
32
35
33
// Down stop and remove containers
36
34
func (wrapper * ComposeWrapper ) Down (filePath , url , projectName string ) ([]byte , error ) {
37
- return wrapper .Command (newDownCommand (filePath ), url , projectName , "" , "" )
35
+ return wrapper .Command (newDownCommand (filePath ), url , projectName , "" )
38
36
}
39
37
40
38
// Command exectue a docker-compose commanåd
41
- func (wrapper * ComposeWrapper ) Command (command composeCommand , url , projectName , envFilePath , configPath string ) ([]byte , error ) {
39
+ func (wrapper * ComposeWrapper ) Command (command composeCommand , url , projectName , envFilePath string ) ([]byte , error ) {
42
40
program := programPath (wrapper .binaryPath , "docker-compose" )
43
41
44
42
if projectName != "" {
@@ -55,12 +53,6 @@ func (wrapper *ComposeWrapper) Command(command composeCommand, url, projectName,
55
53
56
54
var stderr bytes.Buffer
57
55
cmd := exec .Command (program , command .ToArgs ()... )
58
-
59
- if configPath != "" {
60
- cmd .Env = os .Environ ()
61
- cmd .Env = append (cmd .Env , fmt .Sprintf ("DOCKER_CONFIG=%s" , configPath ))
62
- }
63
-
64
56
cmd .Stderr = & stderr
65
57
66
58
output , err := cmd .Output ()
0 commit comments