Graceful stop of service with docker stop

Hi Tim, thanks for the help - I’m using 1.4.4

I logged into the container as root to send SIGTERM direclty

> docker-compose exec -u 0 user bash
root@9b62ded44b19:/opt/docker# kill -n 15 1

and nothing happened, so then I

root@9b62ded44b19:/opt/docker# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
daemon       1  0.0  0.0   4292   468 ?        Ss   19:57   0:00 /bin/sh -c bin/
daemon      14 12.6  2.1 9996128 343576 ?      Sl   19:57   0:45 /docker-java-ho
root      2322  0.0  0.0  19900  3520 pts/0    Ss   20:02   0:00 bash
root      2596  0.0  0.0  38384  3108 pts/0    R+   20:03   0:00 ps aux

and then
root@9b62ded44b19:/opt/docker# kill -n 15 14

It shutdown almost instantly and checking the logs showed a nice orderly shutdown.

I think docker stop sends to pid 1 which doesn’t work for these images. I’m not super familiar with docker yet so I’m not sure if this is an issue with sbt-native-packager or how it’s configured in build.sbt - or something else. My docker settings are closely ripped from the chirper kubernetes example and you can see them in the TagWriter issue I posted at TagWriter fails if cassandra isn’t started before lagom service.

I’m not at the stage of using kubernetes yet, but I don’t see why this would be any different for anyone using the chirper example as a guide to build docker images for any orchestration platform. Do you know if others are getting their containers shutdown gracefully or are they all being killed after timeout?