From 4aa970ace821520d1df694e47d889e24bebb03bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Nie=C5=82acny?= Date: Tue, 28 Apr 2015 17:41:48 +0200 Subject: [PATCH] Do not kill docker container with SIGKILL When we will use `kill` command on `docker` main process will receive `SIGKILL` signal. This will result in immediate termination of processes. We need to send a signal `SIGTERM` to main process and give the opportunity to close application in correct way. --- dokku | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dokku b/dokku index 1462d1619..283e11d20 100755 --- a/dokku +++ b/dokku @@ -91,7 +91,7 @@ case "$1" in # if we can't post-deploy successfully, kill new container kill_new() { - docker inspect $id &> /dev/null && docker kill $id > /dev/null + docker inspect $id &> /dev/null && docker stop $id > /dev/null && docker kill $id > /dev/null trap - INT TERM EXIT kill -9 $$ } @@ -120,6 +120,7 @@ case "$1" in exec >/dev/null 2>/dev/null