no -v option in docker-compose down
Currently DockerCompose object is stopped like this.
def stop(self):
down_cmd = self.docker_compose_command() + ['down', '-v']
subprocess.call(down_cmd, cwd=self.filepath)
The '-v' option is firmly coded - I would like to be able to choose the options for stop command. Sometimes I don't want the volumes to be removed
Actually in
class DockerContainer(object):
you have a parameter for deleting containers after use
def stop(self, force=True, delete_volume=True):
self.get_wrapped_container().remove(force=force, v=delete_volume)
So just to need to make this consistent across the repo. Maybe something along these lines in DockerCompose:
def stop(self, delete_volume=True):
down_cmd = self.docker_compose_command() + ['down'] + (['-v'] if delete_volume else [])
subprocess.call(down_cmd, cwd=self.filepath)
Thanks for reporting, @NikZak. Are you up for putting together a PR?
I can make a PR but will you be able to quickly merge it? Just asking because I made prs in repos and now have a confirmation coming every three months and after a year they're still not merged. It's discouraging
We will review it as soon as possible