docker stop sends a signal to the process with PID of 1 inside the docker. However, if the docker has an entrypoint of /bin/bash running one or more commands, /bin/bash becomes PID 1 and the signal will be received by /bin/bash but it will not be forwarded along to processes running in the shell. This causes docker stop to timeout instead of shutting the docker down properly.