-
Notifications
You must be signed in to change notification settings - Fork 107
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
Allow docker stack deploy from stdin #581
Comments
Hi @derfl0 sorry for the delay, I've been busy with other things. Currently python-on-whales doesn't support this. I would be happy to support it in the future. Though reading from stdin in python doesn't make much sense (it makes sense in a CLI). What I would propose is that we find a good name for a new argument to this function: https://gabrieldemarmiesse.github.io/python-on-whales/sub-commands/stack/#python_on_whales.components.stack.cli_wrapper.StackCLI.deploy and this argument would take a string as input. Inside the string would be the yaml of your stack. Would that work for you? |
Hey @gabrieldemarmiesse , no need to apologise as you work free of charge ;) the proposed solution is exactly what I would need. Talking about Stdin: Having a communication interface with the subprocess below would be awesome. Currently, in my native approach, I use the communicate method ( https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate )
|
Hey, thank you for this great project. I am currently trying to replace subprocess calls in my code by your lib. I have some logic in the stack template and therefore need to heavily modify it according to my needs.
Since v1.25 it is possible to read the compose.yml from stdin (See: https://docs.docker.com/reference/cli/docker/stack/deploy/ ) which I use to read from a modified string.
Is it possible to implement this option in the lib as well?
The text was updated successfully, but these errors were encountered: