title: How does Azure App Service manage port binding with docker container? Does it recognize Expose?
body: <p>I just deployed a docker image from azure cr to azure app service.</p>
  <p>The docker image contains a .net core API. This is the dockerfile:</p>
  <pre><code>#Running aspnet core 3.1 runtime on ubuntu 20.04
  FROM mcr.microsoft.com/dotnet/aspnet:3.1.14-focal
  EXPOSE 5000
  
  ENV ASPNETCORE_URLS=&quot;http://0.0.0.0:5000&quot;
  
  COPY myapi/bin/Release/netcoreapp3.1/publish/ api/
  WORKDIR /api    
  ENTRYPOINT [ &quot;dotnet&quot;, &quot;myapi.dll&quot;]
  </code></pre>
  <p>This API is listening on port 5000, and I haven't given this information to Azure in any way, except with the EXPOSE command in the dockerfile. And yet, I can access myapi correctly from the url azure gave me, using port 443. I'm surprised this is working.</p>
  <p>Is Azure detecting the EXPOSE command in my docker file? Or what is it that makes this work?</p>