You are running your server inside a shell, and the shell is the process receiving the signals. Your server doesn't exit until you force the shell to quit.
When you use the "shell" form of CMD, it starts your server as an argument to
/bin/sh -c. In order to exec the server binary directly, you need to provide an array of arguments to either CMD or ENTRYPOINT, starting with the full path of the executable.
A note from ENTRYPOINT in the Dockerfile docs:
The shell form prevents any CMD or run command line arguments from being used, but has the disadvantage that your ENTRYPOINT will be started as a subcommand of /bin/sh -c, which does not pass signals.