How can I forward localhost port on my container to localhost on my host?

前端 未结 4 1701
遇见更好的自我
遇见更好的自我 2020-12-05 13:39

I have a daemon on my host running on some port (i.e. 8008) and my code normally interacts with the daemon by contacting localhost:8008 for instance.

I\'ve now conta

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-05 14:05

    I'm not sure if you can do that just with docker's settings. If my under standing is correct, expose port is not what you looking for. Instead, establish ssh port forwarding from container to host mightbe the answer.

提交回复
热议问题