Heroku launches docker image with port parameter

When I click on an existing docker image on Heroku, Heroku provides an environment variable $PORT. How to pass this property to Heroku launch instance?

In localhostthis will work:

docker pull swaggerapi/swagger-ui
docker run -p 80:8080 swaggerapi/swagger-ui

On Heroku, I have to do:

docker run -p $PORT:8080 swaggerapi/swagger-ui

Is this possible?

+6
source share

Source: https://habr.com/ru/post/1017262/


All Articles