-
-
Notifications
You must be signed in to change notification settings - Fork 502
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
Feature request: Enable using stdin when starting docker compose #285
Comments
Hello! A possible solution you can use today is to write your content := []byte("temporary file's content")
dir, err := ioutil.TempDir("", "example")
if err != nil {
log.Fatal(err)
}
defer os.RemoveAll(dir) // clean up
tmpfn := filepath.Join(dir, "tmpfile")
if err := ioutil.WriteFile(tmpfn, content, 0666); err != nil {
log.Fatal(err)
}
Let me know if it works for you! |
This works and is ok for me but reading from stdin would be a little bit nicer and cleaner. ;-) Thanks in advance. |
testcontainers#285 add constructor that takes []io.Reader
@normanjaeckel I added a comment in #457, which asks for delaying the review of #457 after the revamp of the docker-compose module in #476 takes place |
testcontainers#285 add constructor that takes []io.Reader
testcontainers#285 add WithReaders helper function
testcontainers#285 disable tmp files dir cleaning
testcontainers#285 change to avoid filepath collision on parallel tests running
@normanjaeckel I created #2509 to support passing an io.Reader to the compose API. That will allow you to generate the compose files on the fly and just pass the readers. Do you think this is enough for you? Thanks! |
Sounds good. I do not have time for now to check this again but I thank you very much for the follow up. |
It would be a nice feature if one can use stdin to inject a docker compose file on the fly instead of using a file path. Docker Compose supports this. Wenn giving
-
as filename to command line option-f
docker compose reads the configuration from stdin.Maybe somewhere here this can be done (but I am not good enough to make an acceptable pull request).
The text was updated successfully, but these errors were encountered: