title: Connection refused while running .net core 2.0 web api on docker
body: <p>These are my beginnings with docker, however I'm stuck now.</p>
  
  <p>When I run my .NET Core Web Api typing: </p>
  
  <pre><code>dotnet run
  </code></pre>
  
  <p>this is my result:</p>
  
  <pre><code>Hosting environment: Production
  Content root path: C:\Users\...\PickCashOut.API\PickCashOut.Web
  Now listening on: http://[::]:80
  Application started. Press Ctrl+C to shut down.
  </code></pre>
  
  <p>And everything works great. But after build docker container with this:</p>
  
  <pre><code>FROM microsoft/dotnet:2.0-sdk as builder
  ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
  WORKDIR /app
  
  COPY . ./
  RUN dotnet restore PickCashOut.Web/PickCashOut.Web.csproj
  RUN dotnet publish PickCashOut.Web/PickCashOut.Web.csproj -c Release -o out -r linux-x64
  
  FROM microsoft/dotnet:2.0-runtime
  ENV ASPNETCORE_URLS http://+:80
  WORKDIR /app
  COPY --from=builder /app/PickCashOut.Web/out .
  ENTRYPOINT ["dotnet", "PickCashOut.Web.dll"]
  </code></pre>
  
  <p>result is:</p>
  
  <pre><code>Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
        No XML encryptor configured. Key {25360c91-217e-4770-962a-6282970c245c} may be persisted to storage in unencrypted form.
  Hosting environment: Production
  Content root path: /app
  Now listening on: http://[::]:80
  Application started. Press Ctrl+C to shut down.
  </code></pre>
  
  <p>but I cannot access to endpoints any longer. </p>
  
  <pre><code>Failed to connect to 195.*.*.87 port 80: Connection refused
  </code></pre>
  
  <p>In general this build is for my ubuntu server, but I have tried it on windows the effect is the same.</p>
  
  <p>Any special settings are required? I read many tutorials and I thought that this should work. </p>
  
  <p>I'd be very grateful for any help. </p>