I’m trying to set up my ASP.NET Core 8.0 Web API to work on Heroku by using a Docker container.
Both on Heroku and Docker it doesn’t seem to work and I can’t figure out why.
When I run it outside the docker and locally on my machine however, it runs on localhost:5000
. Can someone help me?
This is my Dockerfile:
The console:
As you can see the CMD properly recognises the $PORT
environment variable, but it fails to actually run on this port…
Does anyone have an idea what’s going on?