Skip to content
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

Function docker.compose.down does not accept optional list of service names #570

Closed
MisterOwlPT opened this issue Mar 21, 2024 · 2 comments

Comments

@MisterOwlPT
Copy link
Contributor

Hi 😃

The Docker Compose CLI allows the command down to be passed a list of service names (similar to other commands up and rm).

$ docker compose down --help

Usage:  docker compose down [OPTIONS] **[SERVICES]**
Stop and remove containers, networks
...

I noticed that python_on_whales does not currently support this feature, which I personally need for a personal use case.
Calling docker.compose.down() simply stops all declared service containers.

If you agree, I can submit a PR with a logic similar to this such that if service names are provided, then only the related containers are stopped. Otherwise, if no list of service names is provided, all service containers are stopped.

@gabrieldemarmiesse
Copy link
Owner

Thank you for opening this feature request! When I made the first iteration of python-on-whales, this was not available. Feel free to make a pull request, I'll take a look at it.

@gabrieldemarmiesse
Copy link
Owner

Closing as fixed by #571

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants