Skip to content

[Request] - Implement -t | --timeout option for `docker-compose down #3370

Closed

Description

@nschoe

There is the -t | --timeout option that can be passed to docker-compose stop, it would be nice to add this option to docker-compose down.

As down destroys a containers, it means we won't be using it again, so we should be allowed "not to care if it exits correctly. Alternatively it could be a -k | --kill flag so that instead of "stopping and removing container" it would "kill and remove container".

I understand that it should not be the default behavior because some linked containers can still prefer if the present container is stopped correctly, but there are such cases where it could speed things up.

For instance, I do a lot of debugging on an application that unfortunately doesn't handle SIGTERM signal, and it is a pain to wait 10 seconds after running down, so I usually kill it first, then down it.

It's just a suggestion, what do you think?

Activity

  1. pataquets commented on May 3, 2016

    @pataquets

    +1 to --timeout option, with support for matching Docker Engine's -1 value to wait undefinitely until container stops.

  2. tarantegui commented on May 4, 2016

    @tarantegui

    +1 it would be interesting add the down option for specific services, like docker-compose stop apache

  3. dforrest88 commented on Jun 9, 2017

    @dforrest88

    +1 for this. It would be good to be able to gracefully shut down a container via compose, rather than killing it automatically after 10 seconds.

  4. ilinum commented on Nov 6, 2017

    @ilinum

    I would be interested in tackling this issue :)
    Is this something that would be useful?

  5. added a commit that references this issue on Nov 22, 2017
    3b81e49
  6. added this to the 1.18.0 milestone on Dec 5, 2017
  7. added 2 commits that reference this issue on Dec 6, 2017
    02ea166
    6b0138d
  8. added a commit that references this issue on Dec 10, 2017
    d155e51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions