diff --git a/api/filesystem/copy.go b/api/filesystem/copy.go index abf4d33aa..bc0abb766 100644 --- a/api/filesystem/copy.go +++ b/api/filesystem/copy.go @@ -68,7 +68,7 @@ func copyFile(src, dst string) error { defer from.Close() // has to include 'execute' bit, otherwise fails. MkdirAll follows `mkdir -m` restrictions - if err := os.MkdirAll(filepath.Dir(dst), 0744); err != nil { + if err := os.MkdirAll(filepath.Dir(dst), 0755); err != nil { return err } to, err := os.Create(dst) diff --git a/pkg/libstack/compose/composeplugin.go b/pkg/libstack/compose/composeplugin.go index c83685351..8ebc12062 100644 --- a/pkg/libstack/compose/composeplugin.go +++ b/pkg/libstack/compose/composeplugin.go @@ -98,6 +98,11 @@ func withComposeService( WorkingDir: filepath.Dir(filePaths[0]), } + if options.ProjectDir != "" { + // When relative paths are used in the compose file, the project directory is used as the base path + configDetails.WorkingDir = options.ProjectDir + } + for _, p := range filePaths { configDetails.ConfigFiles = append(configDetails.ConfigFiles, types.ConfigFile{Filename: p}) }