Hello Ben Gulliford,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you are having an issue with Windows container stuck in "waiting for container to be ready" as it shown in the log.
To permanently resolve the issue:
- Make sure that the Dockerfile correctly copies the certificate file to the expected location within the container. For example in dockerfile:
COPY C:\https\aspnetapp.pfx /app/httpsaspnetapp.pfx
- Check that the environment variable
ASPNETCORE_Kestrel__Certificates__Default__Path
is set correctly in the Azure App Service configuration. You can do this through the Azure portal under the "Configuration" section of your App Service. - Make sure the certificate file has the correct permissions and is accessible by the application running in the container. Sometimes, permission issues can prevent the application from accessing the file.
- Again, check the detailed logs of your container for any additional error messages. You can do this by navigating to the "Log stream" in the Azure portal. Look for any specific errors that might give more insight into why the container is not starting
- Also, double-check that the application configuration within the container is pointing to the correct certificate path. The path should match the location where the certificate file is copied within the container.
- Sometimes, simply restarting the Azure App Service can resolve issues with environment variables and configurations not being picked up correctly.
- If the issue persists, consider using Azure Key Vault to manage your certificates. Azure Key Vault can securely store and manage access to your certificates, and you can integrate it with your Azure App Service.
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.