Skip to content

Feature: docker kill --all terminate all containers at once #3565

Open
@bchadwic

Description

Description

As a user when I'm building new projects I tend to spin up and kill a lot of containers for troubleshooting purposes.

Typically I do something like this alias dka='docker kill $(docker ps -q)', but I wonder why there isn't a flag for either docker stop or docker kill that does this.

If docker ps -q returns nothing, then naturally docker kill will display the help. Thus extra steps are needed in scripting to avoid this output.

Proposal

Could docker kill and/or docker stop have a -a/--all flag that terminates any available running containers? I imagine the -s flag could be used in combination like docker kill -a -s SIGQUIT

Another option would be docker killall which would allow for more in depth options like killall. This isn't necessary for my use case though.

If this is a valid feature, I'd like to give it a shot at implementing it 👍

Thank you

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions