@@ -49,14 +49,14 @@ func main() {
4949
5050 dockerizedRoot := getDockerizedRoot ()
5151 dockerizedDockerComposeFilePath := os .Getenv ("COMPOSE_FILE" )
52- if dockerizedDockerComposeFilePath != "" {
53- if optionVerbose {
54- fmt .Println ("COMPOSE_FILE: " , dockerizedDockerComposeFilePath )
55- }
56- } else {
52+ if dockerizedDockerComposeFilePath == "" {
5753 dockerizedDockerComposeFilePath = filepath .Join (dockerizedRoot , "docker-compose.yml" )
5854 }
5955
56+ if optionVerbose {
57+ fmt .Println ("Dockerized docker-compose file: " , dockerizedDockerComposeFilePath )
58+ }
59+
6060 if commandName == "" || optionHelp {
6161 err := help (dockerizedDockerComposeFilePath )
6262 if err != nil {
@@ -356,6 +356,10 @@ func getBackend() (*api.ServiceProxy, error) {
356356
357357func dockerComposeBuild (dockerComposeFilePath string , buildOptions api.BuildOptions ) error {
358358 project , err := getProject (dockerComposeFilePath )
359+ err = os .Chdir (project .WorkingDir )
360+ if err != nil {
361+ return err
362+ }
359363 if err != nil {
360364 return err
361365 }
@@ -369,6 +373,10 @@ func dockerComposeBuild(dockerComposeFilePath string, buildOptions api.BuildOpti
369373}
370374
371375func dockerComposeRun (project * types.Project , runOptions api.RunOptions , volumes []types.ServiceVolumeConfig ) error {
376+ err := os .Chdir (project .WorkingDir )
377+ if err != nil {
378+ return err
379+ }
372380 ctx , _ := newSigContext ()
373381
374382 serviceName := runOptions .Service
0 commit comments