| 965 | |
| 966 | |
| 967 | class DownCommand(DockerComposeCommand): |
| 968 | def __init__(self) -> None: |
| 969 | super().__init__( |
| 970 | "down", |
| 971 | "Stop and remove containers, networks", |
| 972 | resolve_image_specs=False, |
| 973 | ) |
| 974 | |
| 975 | def run(self, args: argparse.Namespace) -> Any: |
| 976 | args.unknown_subargs[0:0] = ["--timeout", "0"] |
| 977 | args.unknown_subargs.append("--volumes") |
| 978 | # --remove-orphans needs to be in effect at all times otherwise |
| 979 | # services added to a composition after the fact will not be cleaned up |
| 980 | args.unknown_subargs.append("--remove-orphans") |
| 981 | super().run(args) |
| 982 | |
| 983 | |
| 984 | EventsCommand = DockerComposeCommand( |