'Running docker-compose from python [duplicate]
I am looking for a way to run a docker-compose file from python script. I looked in Docker SDK for python, but i didn't found anything about docker-compose. So, is there a way to run a docker-compose file from python script?
Solution 1:[1]
The question was answered by @cricket_007:
It's not a supported use case, nor meant to be used that way. github.com/docker/compose/issues/4542#issuecomment-283191533 You could just use subprocess module to shell out to the commands, or use docker-py directly – cricket_007 Dec 9 '18 at 22:36
And the answer was accepted by the OP:
Ok so, I think the simplest way for me is to use subprocess module. Thanks for your response :) – Nidal
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
