summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi/containers.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/domain/infra/abi/containers.go')
-rw-r--r--pkg/domain/infra/abi/containers.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go
index ad0e957e9..19232eff1 100644
--- a/pkg/domain/infra/abi/containers.go
+++ b/pkg/domain/infra/abi/containers.go
@@ -179,6 +179,12 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin
report.Err = err
reports = append(reports, &report)
continue
+ } else if err := con.Cleanup(ctx); err != nil {
+ // Only if no error, proceed to cleanup to ensure all
+ // mounts are removed before we exit.
+ report.Err = err
+ reports = append(reports, &report)
+ continue
}
reports = append(reports, &report)
}