Here is what you can try, for keeping your containers alive even if docker daemon stops.
You need to add the configuration to the daemon configuration file. On Linux, this defaults to
/etc/docker/daemon.json.
use the below JSON to enable live-restore.
{
"live-restore": true
}
After that try restarting your docker daemon. You can avoid a restart by reloading the Docker daemon. If you use
systemd
then use the command :
systemctl reload docker
I hope it will help you resolve your query.