mirror of
https://github.com/docker/compose.git
synced 2025-07-23 05:34:36 +02:00
Pass through standard remove_container options
This commit is contained in:
parent
044c348faf
commit
5be8a37b7e
@ -183,8 +183,10 @@ class TopLevelCommand(Command):
|
|||||||
print("Going to remove", list_containers(stopped_containers))
|
print("Going to remove", list_containers(stopped_containers))
|
||||||
if options.get('--force') \
|
if options.get('--force') \
|
||||||
or yesno("Are you sure? [yN] ", default=False):
|
or yesno("Are you sure? [yN] ", default=False):
|
||||||
self.project.remove_stopped(service_names=options['SERVICE'],
|
self.project.remove_stopped(
|
||||||
remove_volumes=options.get('-v', False))
|
service_names=options['SERVICE'],
|
||||||
|
v=options.get('-v', False)
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
print("No stopped containers")
|
print("No stopped containers")
|
||||||
|
|
||||||
|
@ -112,8 +112,7 @@ class Container(object):
|
|||||||
return self.client.kill(self.id)
|
return self.client.kill(self.id)
|
||||||
|
|
||||||
def remove(self, **options):
|
def remove(self, **options):
|
||||||
v = options.get('remove_volumes', False)
|
return self.client.remove_container(self.id, **options)
|
||||||
return self.client.remove_container(self.id, v=v)
|
|
||||||
|
|
||||||
def inspect_if_not_inspected(self):
|
def inspect_if_not_inspected(self):
|
||||||
if not self.has_been_inspected:
|
if not self.has_been_inspected:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user