I have a process in a docker container that is supposed to log a thread dump (on stdout) when shut down. However when docker stop
is called on it, no output happens.
It seems that either the process doesn't receive the TERM signal or the output is detached before the shutdown is complete.
I'm using only a CMD
(no ENTRYPOINT
) in my Dockerfile:
CMD java ${MY_JAVA_OPTS} my-uberjar.jar
How do I get output on shutdown working?