Skip to content

Commit 5a3358e

Browse files
authored
chore: support destroying orphan containers when destroying the stack with down command (#537)
1 parent 5b926fe commit 5a3358e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/stack/compose.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func dockerComposeDown(options Options) error {
100100
downOptions := compose.CommandOptions{
101101
Env: append(appConfig.StackImageRefs(options.StackVersion).AsEnv(), options.Profile.ComposeEnvVars()...),
102102
// Remove associated volumes.
103-
ExtraArgs: []string{"--volumes"},
103+
ExtraArgs: []string{"--volumes", "--remove-orphans"},
104104
}
105105
if err := c.Down(downOptions); err != nil {
106106
return errors.Wrap(err, "running command failed")

0 commit comments

Comments
 (0)