I am unsure where to use the $PORT environment variable in my
Dockerfile for a container app
Container based apps using a
Dockerfile have no build phase as part of the deploy process (the images are built locally before they are pushed to the registry). This means that dynamic information like the value of the
$PORT environment variable must be read at runtime -the
EXPOSE in the
Dockerfile is not respected by the Heroku platform, but can be used for local testing.