In container instance, you can always specify the restart policy which will manage the restart of the container in case that container process exits. You can read more about it here.
Having said that, I would suggest to have alert on the basis of health url which will ensure your container is ready to serve traffic. Azure monitoring system provides ways to do that, please check this doc for details.
Please 'Accept as answer' if the provided information is helpful, so that it can help others in the community looking for help on similar topics.