A simple bash script that will restart a Minecraft docker container and pass warning along to the players.
You might need to change the location of the docker binary from the default /usr/local/bin/docker to accommodate your set up as the script was written for macOS.