How do I stop a .net core app inside docker?

2019-08-28 07:37发布

问题:

I want to create a crash inside my .net core application. I used Process.GetCurrentProcess().Kill() which works fine when I run the application using dotnet run. Although if I run the app inside a docker container, the application continues to function happily.

I am open to ideas on the best way to do FIT (fault injection testing) for .net core.

Any ideas?

PS: I have also tried creating a StackoverflowException but it doens't cause a crash while running in docker