Does the current Python SDK have support for Docker Compose CLI?
Hi @haohanyang
In fact, it's the opposite; docker-compose uses docker-py to access the docker engine.
You can use Docker Compose itself for that:
pip install docker-compose
Have a nice day :)
Thanks.
I want to setup a backend(flask) and do something like docker-compose -p myProject scale worker=5 via an API gateway(likeHTTP /rpc/scale?worker=5). How can I possibly do it?
Hi @haohanyang
Definitely, you will need docker-compose for that.
You can start here; that is the CLI main function.
Have a nice day :)
@ulyssessouza we can close this issue.
@haohanyang, if you have more questions, feel free to open a new issue.
Hello @haohanyang !
As @feliperuhland said, docker-compose depends on docker-py as a library.
And note that docker-compose is a final product, thus it does not have any kind of API to be used as code dependency on any means. Given that, the use docker-compose as a library is on your own responsibility.
Most helpful comment
Hello @haohanyang !
As @feliperuhland said,
docker-composedepends ondocker-pyas a library.And note that
docker-composeis a final product, thus it does not have any kind of API to be used as code dependency on any means. Given that, the usedocker-composeas a library is on your own responsibility.