Port forwarding in docker-machine?

前端 未结 6 1827
一向
一向 2020-11-29 20:25

Since boot2docker is deprecated I\'ve switched to docker-machine but I don\'t know how to open a port from docker-machine. In bo

6条回答
  •  一个人的身影
    2020-11-29 20:54

    If you don't want the need to use passwords, I would add that you should just point to the private key.

    ssh -L 8080:localhost:8080 -i ~/.docker/machine/machines/default/id_rsa docker@$(docker-machine ip default)
    

提交回复
热议问题