Avoid triggering crash detection on container destroy

This commit is contained in:
Dane Everitt
2020-01-19 14:00:59 -08:00
parent 59299d3cda
commit ab54d2c416
2 changed files with 4 additions and 0 deletions

View File

@@ -292,6 +292,9 @@ func (d *DockerEnvironment) Terminate(signal os.Signal) error {
func (d *DockerEnvironment) Destroy() error {
ctx := context.Background()
// Avoid crash detection firing off.
d.Server.SetState(ProcessStoppingState)
return d.Client.ContainerRemove(ctx, d.Server.Uuid, types.ContainerRemoveOptions{
RemoveVolumes: true,
RemoveLinks: false,