Thanks for reaching out. It seems that your Azure Function container is not responding to HTTP pings on port 80, which is causing the site to fail to start. By default, Azure App Service assumes that your custom container listens on port 80. If your application is configured to listen on a different port, such as 8181, you need to set the WEBSITES_PORT
app setting in your Azure App Service to match the port your application is using.
You can set this using the Azure CLI with the following command:
az webapp config appsettings set --resource-group <group-name> --name <app-name> --settings WEBSITES_PORT=8181
Make sure to replace <group-name>
and <app-name>
with your actual resource group and app name.
Additionally, ensure that your Dockerfile has the correct EXPOSE
directive for the port your application is listening on. Since you mentioned that the middleware is running on port 8181, it should be reflected in your Dockerfile as follows:
EXPOSE 8181
After making these changes, try redeploying your container to Azure and let us know if you are still facing the issue.
References:
- Configure a custom container for Azure App Service (container-linux)
- Configure a custom container for Azure App Service (container-windows)
If this answers your query, do click Accept Answer and Yes for "Was this answer helpful." And if you have any further questions, let us know.