gabrieldemarmiesse / python-on-whales

An awesome Python wrapper for an awesome Docker CLI!
MIT License
537 stars 100 forks source link

docker.compose.build is failing when passing a str variable in services #560

Closed abhisheksingh94 closed 5 months ago

abhisheksingh94 commented 5 months ago

This is what I'm passing

svc_list='stock'

docker.compose.build(services= svc_list , cache=False, progress=None, pull=True, quiet=False, ssh=None, stream_logs=True)

but it gives out error because instead of it doing docker compose --file ./docker-compose.yml build --no-cache --pull stock it does docker compose --file ./docker-compose.yml build --no-cache --pull s t o c k

surprisingly docker.compose.stop(services=svc_list) works fine.

gabrieldemarmiesse commented 5 months ago

It should be a list of strings, but I don't see why we can't accept just a string too. I'll see if it's possible to change this to convert automatically to a list when a string is passed. You should use a list as a fix in the meantime.