This is useful if you need to stop your Docker daemon (e.g. planned maintenance) and your running containers were started without a restart flag:
docker update --restart=on-failure:3 CONTAINER [CONTAINER...]
# or
docker update --restart=always CONTAINER [CONTAINER...]