docker doesnt properly shutdown server - possible world corruption
When using the commands docker stop <containerid> or docker restart <containerid>, docker fails to gracefully stop the server and thus invites corruption of the world files.
You can check this yourself by not auto-removing the container when it stops ( no --rm in your docker start script).
Then stop the server with docker stop <containerid>
Then type: docker inspect -f '{{.State.ExitCode}}' <containerid>
It will return: 137
In fact, an exit status greater than 128 is typically a sign that the process was terminated as a result of an unhandled signal. 137 = 128 + 9 -- meaning that the process was terminated as a result of signal number 9 (SIGKILL). --https://www.ctl.io/developers/blog/post/gracefully-stopping-docker-containers/
Thanks for the info. I've added this to the wiki as well.
If you want to automate server restarts then you should run your docker container in a screen (using the screen command).
Then you can modify this restart script for your needs.
screen -S <screenID> -X stuff 'stop'$(echo -ne '\015') && sleep 10; bash /path/to/<startscript.sh>
Add this to the wiki please