How do I check container logs for StartFailures?
If you encounter persistent start failures when deploying a container group, it is likely that your code is exiting early due to errors or exceptions. In most cases, you won't have access to log information from container logs because the deployment fails before logs can be captured. Here are some steps to troubleshoot this issue.
Step One
Navigate to the container group experiencing the issue and click the "Edit" button. Locate the "Command" section and open it. Here, you will override the ENTRYPOINT and CMD in your container image with the following:
- Command: sh
- Argument 1: -c
- Argument 2: sleep infinity
Start the container group again. Once the instances are running, you can click on an instance and log in using the interactive shell. From there, run and test your code to identify the issue.