How do I expose ports on Heroku with a Dockerfile?

前端 未结 2 1252
陌清茗
陌清茗 2020-12-19 02:39

I am trying to deploy a Docker image on Heroku and am trying to understand how to expose multiple ports. Here is the Docker command that I am trying to run in the Heroku de

2条回答
  •  抹茶落季
    2020-12-19 03:14

    You can't - you should use the $PORT environment variable which will be randomly assigned and then mapped to port 80 by the Heroku routers. Also, only http requests are accepted. See https://devcenter.heroku.com/articles/container-registry-and-runtime#dockerfile-commands-and-runtime for more details.

提交回复
热议问题