How to ssh into docker-machine VirtualBox instance?

后端 未结 7 2003
萌比男神i
萌比男神i 2020-12-22 16:57

docker-machine version 0.2.0 docker version 1.6.2

I\'m using docker-machine to create a machine using VirtualBox. Everything works fine but I\'d like to ssh into th

7条回答
  •  一个人的身影
    2020-12-22 17:54

    if you really need to do it via ssh, this is working with docker 1.8.2

    init docker:

    eval "$(docker-machine env default)"
    

    get the IP from your default docker machine:

    docker-machine ip default
    

    this prints something like this out: 192.168.99.100

    ssh docker@192.168.99.100
    

    password is tcuser but you can also use the identity file, see other answer

提交回复
热议问题