学习 docker

If you only have a single docker machine, you simply do:
如果你只有一个实例运行下面的命令就可以进入default主机

$ docker-machine ssh

If you have multiple machines, you need to find your "machine name" first:
如果你有多个实例,运行下面的命令先找到你的主机名 “machine name”

$ docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER    ERRORS
default   *        virtualbox   Running   tcp://192.168.99.101:2376           v1.10.2 

From the above, you can see that default is the name of your machine and you can ssh as follows:
从上面你可以看到default是你的主机名,你可以ssh到主机用下面的

$ docker-machine ssh default

When you're in, it's a simple case of sudo-ing to root
你进入主机后,进入root账户用以下命令

docker@default:~$ sudo -i
Boot2Docker version 1.10.2, build master : 611be10 - Mon Feb 22 22:47:06 UTC 2016
Docker version 1.10.2, build c3959b1
root@default:~# 

Edited: Also, as @MediaVince mentioned you can use the following credentials:

user: docker
pwd: tcuser
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容