-
-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable using stdin when starting docker compose #457
Enable using stdin when starting docker compose #457
Conversation
compose.go
Outdated
return err | ||
} | ||
|
||
file, err := ioutil.TempFile("/Users/aleksamalyshev/", "__tmp_") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this path is a leftover 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, fixed it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work with this PR. I left a few review comments before merging it. Please let me know what you think
compose.go
Outdated
return err | ||
} | ||
|
||
file, err := ioutil.TempFile("", "__tmp_") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you foresee any collision between multiple runs? Do you think we could use the compose identifier as part of the file name in that case 🤔?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed it
@@ -103,8 +104,16 @@ func NewLocalDockerCompose(filePaths []string, identifier string, opts ...LocalD | |||
|
|||
dc.absComposeFilePaths = make([]string, len(filePaths)) | |||
for i, cfp := range dc.ComposeFilePaths { | |||
abs, _ := filepath.Abs(cfp) | |||
dc.absComposeFilePaths[i] = abs | |||
if cfp == "-" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm I do not get this line. Is it expected to receive a -
as a file path for a compose file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is
Co-authored-by: Manuel de la Peña <[email protected]>
Closes #285