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

Proposal: Possibility to exclude containers on remove #2263

Closed
avoinea opened this issue Oct 27, 2015 · 3 comments
Closed

Proposal: Possibility to exclude containers on remove #2263

avoinea opened this issue Oct 27, 2015 · 3 comments

Comments

@avoinea
Copy link

avoinea commented Oct 27, 2015

Motivation for this proposal

  • Possibility to bulk remove all container except some (e.g. data container).

Proposal

  • Add --exclude option for rm command:
  $ docker-compose rm -v --exclude data

The command above should remove all containers, except data one.

@dnephin
Copy link

dnephin commented Oct 27, 2015

In some ways this is related to #1294 in that it's a request to be able to execute some command on a subset of services.

As you probably already know, this is possible by listing the services to include, but there is no way to say "all but one" or, "all but some".

If we were to support that, I think we would want to support it in a way that works for all commands, without having to add a new flag to each.

I have been considering something like this:

docker-compose rm -v -data

The - prefix would mean to exclude it from the list of services. I'm not sure how that would work with the docopt argument parser though.

@dnephin
Copy link

dnephin commented Jan 15, 2016

I believe this is similar enough to #1294, going to close

@dnephin dnephin closed this as completed Jan 15, 2016
@MaitreyaBuddha
Copy link

I am sad that this was closed. Issue #1294 mentions both up and down but only addresses up and ignores down, while this issue is specifically about down, but was closed due to the other issue that only ended up addressing up. So now there is no issue specific to down such as this.

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

No branches or pull requests

3 participants