diff --git a/pkg/errors/abort.go b/pkg/errors/abort.go index 736ce7b9..97220efd 100644 --- a/pkg/errors/abort.go +++ b/pkg/errors/abort.go @@ -2,10 +2,17 @@ package errors -import "syscall" +import ( + "os" + "syscall" +) // Abort will terminate & sends SIGTERM to process func Abort(i ...int) { + if _, err := os.Stat("/.dockerenv"); err == nil { + os.Exit(i[0]) + } + pgid, err := syscall.Getpgid(syscall.Getpid()) if err != nil { Exit(err.Error())