title: How to configure the default port for a dotnet MVC application?
body: <p>I am working on a very basic asp.net core web application.</p>
  
  <p>When I run the application manually on my personal computer, the port is 5050.</p>
  
  <p>I have written a Dockerfile (inspired from a tutorial). Here it is:</p>
  
  <pre><code>FROM microsoft/dotnet:2.2-aspnetcore-runtime AS base
  WORKDIR /app
  EXPOSE 80
  
  FROM microsoft/dotnet:2.2-sdk AS build
  WORKDIR /src
  COPY ["projet1.csproj", "./"]
  RUN dotnet restore "./projet1.csproj"
  COPY . .
  WORKDIR "/src/."
  RUN dotnet build "projet1.csproj" -c Release -o /app
  
  FROM build AS publish
  RUN dotnet publish "projet1.csproj" -c Release -o /app
  
  FROM base AS final
  WORKDIR /app
  COPY --from=publish /app .
  ENTRYPOINT ["dotnet", "projet1.dll"]
  </code></pre>
  
  <p>When I run the image, the application is answering on port 80. This is a good thing, but I want to understand why it is listening on port 80. </p>
  
  <p>I have no configuration file or no command line argument which says to my app to listen on port 80. How is this difference possible? </p>