I am trying to deploy .NET core web API to Heroku.

Below is my `Dockerfile`:

```
FROM mcr.microsoft.com/dotnet/core/aspnet:2.1 AS runtime
WORKDIR /app
COPY /out ./
CMD ASPNETCORE_URLS=http://*:$PORT dotnet dotnetcoreapi.dll

```

This `Dockerfile` works fine on Heroku, but when I tried to deploy with

```
FROM mcr.microsoft.com/dotnet/core/aspnet:2.1 AS runtime
WORKDIR /app
COPY /out ./
ENTRYPOINT ["dotnet","dotnetcoreapi.dll"]

```

Heroku gives me this error:

> 
> Unable to start Kestrel. System.Net.Sockets.SocketException (13): Permission denied
> 
> 
> 

Why doesn't `ENTRYPOINT ["dotnet","dotnetcoreapi.dll"]` work on Heroku? Both versions work fine on my local machine