title: ASPNETCORE_URLS not being applied (deploying in docker container)
body: <p>I'm trying to have my asp.net core app use ASPNETCORE_URLS to set the launch URL. It is not working as expected.</p>
  <p>I have tried everything I found online, but I keep getting stuck. The app works without the environmental variables and runs in a docker container fine. But wont work when enabling environmental variables.</p>
  <p>Desired result: 0.0.0.0:5000
  Result : localhost:5000</p>
  <p>Startup:</p>
  <pre><code>        public Startup(IConfiguration configuration, IWebHostEnvironment env)
      {
          Configuration = new ConfigurationBuilder()
               .SetBasePath(env.ContentRootPath)
            .AddJsonFile(&quot;appsettings.json&quot;)
            .AddJsonFile($&quot;appsettings.{env.EnvironmentName}.json&quot;)
            .AddEnvironmentVariables()
            .Build();
      }
  </code></pre>
  <p>Env variable in dockerfile:</p>
  <pre><code>ENV ASPNETCORE_URLS=http://+:5000
  </code></pre>
  <p>Docker File:</p>
  <pre><code>#See https://aka.ms/containerfastmode to understand how Visual Studio uses 
  
  this Dockerfile to build your images for faster debugging.
  
  FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
  WORKDIR /app
  EXPOSE 5000
  ENV ASPNETCORE_URLS=http://+:5000
  
  FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
  WORKDIR /src
  COPY [&quot;Platform/Platform.API/Platform.API.csproj&quot;, &quot;Platform.API/&quot;]
  COPY [&quot;Platform/Platform.Domain/Platform.Domain.csproj&quot;, &quot;Platform.Domain/&quot;]
  COPY [&quot;Platform/Platform.DataAccess/Platform.DataAccess.csproj&quot;, &quot;Platform.DataAccess/&quot;]
  RUN dotnet restore &quot;Platform.API/Platform.API.csproj&quot;
  COPY ./Platform .
  WORKDIR &quot;/src/Platform.API&quot;
  RUN dotnet build &quot;Platform.API.csproj&quot; -c Release -o /app/build
  
  FROM build AS publish
  RUN dotnet publish &quot;Platform.API.csproj&quot; -c Release -o /app/publish
  
  FROM base AS final
  WORKDIR /app
  COPY --from=publish /app/publish .
  ENTRYPOINT [&quot;dotnet&quot;, &quot;Platform.API.dll&quot;]
  </code></pre>
  <p>The environmental variable is detected by the application, it just wont be used for some reason.</p>
  <p>Thanks in advance!</p>