You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most compose subcommands support an optional list of services to operate with, instead of all compose services.
Is there a good reason why the down command behaves differently?
My use case:
Stop a single service of the compose stack, AND remove all corresponding named volumes with it.
A close workaround would be to use compose stop && compose rm -v - but this works only for anonymous volumes, not named volumes.
So in addition to the [SERVICE...] argument for compose down, maybe it would also be nice and consistent to have an additional flag for the compose rm to also include named volumes, when needed (not my use case).
The text was updated successfully, but these errors were encountered:
@ndeloof thanks for your response.
I had a look, but this change will probably require more than just adding some cmd flags, so no PR from my side, sorry.
The only workaround I see so far, is to use "docker volume rm" for the corresponding name volumes.
But that requires of course that the volume cleanup process knows the mapping between services and their volumes.
During runtime this could be retrieved by "docker container inspect", but deleting volumes from services that are currently not running/created would require to get the info from compose.yml.
Description
Most compose subcommands support an optional list of services to operate with, instead of all compose services.
Is there a good reason why the
down
command behaves differently?My use case:
Stop a single service of the compose stack, AND remove all corresponding named volumes with it.
A close workaround would be to use
compose stop && compose rm -v
- but this works only for anonymous volumes, not named volumes.So in addition to the [SERVICE...] argument for
compose down
, maybe it would also be nice and consistent to have an additional flag for thecompose rm
to also include named volumes, when needed (not my use case).The text was updated successfully, but these errors were encountered: