Azure-docs: Container didn't respond to HTTP pings on port: 80, failing site start. See container logs for debugging.

Created on 21 Sep 2020  路  3Comments  路  Source: MicrosoftDocs/azure-docs

I have a Docker Image of a Net Core 3.1 application which I have pushed to Azure Container Registry.

ERROR
Container webapplication03-dev_0_403efc17 for site webapplication03-dev has exited, failing site start ERROR - Container webapplication03-dev_0_403efc17 didn't respond to HTTP pings on port: 80, failing site start. See container logs for debugging.

I have exposed port 80 in the DOCKERFILE.

DOCKERFILE

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80

FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY ["WebApplication3/WebApplication3.csproj", "WebApplication3/"]
RUN dotnet restore "WebApplication3/WebApplication3.csproj"
COPY . .
WORKDIR "/src/WebApplication3"
RUN dotnet build "WebApplication3.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "WebApplication3.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "WebApplication3.dll"]

Any ideas why I get the error?

Pri3 container-registrsvc cxp product-question triaged

All 3 comments

@debopam-alinta Thank you for sharing your query! We are currently investigating and will get back to you shortly on this.

@debopam-alinta The automatic port detection detects the port (port 80 is the default), we will attempt to detect which port to bind to your container, but you can also use the WEBSITES_PORT app setting and configure it with a value for the port you want to bind to your container. However, the web server in your custom image may use a port other than 80. You tell Azure about the port that your custom container uses by using the WEBSITES_PORT app setting. In this case, yes you will have to change the App Setting configuration from the Portal.

For a different port - Use the EXPOSE instruction in your Dockerfile to expose the appropriate port (E.g 3000) and use the WEBSITES_PORT app setting on Azure with a value of "3000" to expose that port.

Same issue has been reported here as well and you can check this thread for more information.

Hope it help !!!

@debopam-alinta Hope the provided information is helpful.

We will now close this issue. If there are further questions regarding this, please tag me in a comment. I will reopen it and we will continue the discussion.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

varma31 picture varma31  路  3Comments

DeepPuddles picture DeepPuddles  路  3Comments

Agazoth picture Agazoth  路  3Comments

jamesgallagher-ie picture jamesgallagher-ie  路  3Comments

monteledwards picture monteledwards  路  3Comments