Stop other containers if the flag is set.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
bf2bf21720
commit
15b2094bad
3 changed files with 7 additions and 15 deletions
|
|
@ -662,6 +662,10 @@ class TopLevelCommand(DocoptCommand):
|
|||
print("Attaching to", list_containers(log_printer.containers))
|
||||
log_printer.run()
|
||||
|
||||
if cascade_stop:
|
||||
print("Aborting on container exit...")
|
||||
project.stop(service_names=service_names, timeout=timeout)
|
||||
|
||||
def version(self, project, options):
|
||||
"""
|
||||
Show version informations
|
||||
|
|
@ -774,9 +778,6 @@ def up_shutdown_context(project, service_names, timeout, detached):
|
|||
except signals.ShutdownException:
|
||||
print("Gracefully stopping... (press Ctrl+C again to force)")
|
||||
project.stop(service_names=service_names, timeout=timeout)
|
||||
except signals.CascadeStopException:
|
||||
print("Aborting on container exit... (press Ctrl+C to force)")
|
||||
project.stop(service_names=service_names, timeout=timeout)
|
||||
except signals.ShutdownException:
|
||||
project.kill(service_names=service_names)
|
||||
sys.exit(2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue