Skip to content

up: do not stop dependency containers#9701

Merged
milas merged 2 commits intodocker:v2from
milas:up-stop-deps
Aug 2, 2022
Merged

up: do not stop dependency containers#9701
milas merged 2 commits intodocker:v2from
milas:up-stop-deps

Conversation

@milas
Copy link
Contributor

@milas milas commented Aug 1, 2022

What I did
Only the services passed via args are removed at the end
of a non-detached up command invocation now.

This keeps parity with v1, where only the containers explicitly
passed to up are torn down when Ctrl-C is hit, so any
dependencies that got launched (or orphan containers hanging
around) should not be touched.

Related issue
Fixes #9696.

(not mandatory) A picture of a cute animal, if possible in relation with what you did
gopher

This keeps parity with v1, where only the containers explicitly
passed to `up` are torn down when `Ctrl-C` is hit, so any
dependencies that got launched (or orphan containers hanging
around) should not be touched.

Fixes docker#9696.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
@milas milas added the kind/bug label Aug 1, 2022
@milas milas requested a review from a team August 1, 2022 15:59
@milas milas self-assigned this Aug 1, 2022
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
Copy link
Member

@laurazard laurazard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Also, RequireEventuallyContains and RequireServiceState are nice, maybe we can refactor some other tests 😅

@milas milas merged commit 765c071 into docker:v2 Aug 2, 2022
@milas milas deleted the up-stop-deps branch August 2, 2022 19:26
laurentsimon pushed a commit to laurentsimon/compose that referenced this pull request Aug 10, 2022
This keeps parity with v1, where only the containers explicitly
passed to `up` are torn down when `Ctrl-C` is hit, so any
dependencies that got launched (or orphan containers hanging
around) should not be touched.

Fixes docker#9696.

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CTRL+C always stops all running container

2 participants