How to access the VM created by docker's HyperKit?

廉价感情. 提交于 2019-11-27 09:02:04

问题


Docker for Mac uses a Linux VM created by HyperKit for storing and running containers on Mac.

With Docker Toolbox, I can just open VirtualBox and access the docker-machine VM. But with Docker for Mac, how do I access the VM created by HyperKit?


回答1:


Update 2019-01-31, thanks to ru10's update, now there is a better way:

screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty

Original Answer:

After a while, I found following way to get a shell of the VM that was created by HyperKit:

Run from terminal:

screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty

You will see an empty screen, then type enter, you will get a login prompt. Login as root and hit enter, you will get a shell (no password), you will gett the shell:

To exit the session, type Ctrl-A k (then y to confirm).

It is a little bit hacky, but it seems to work for now (Sep 2016) (Sep 2017).




回答2:


Mac OS High Sierra Docker version 18.06.0-ce-mac70 (26399)

screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty

instead of

screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty


来源:https://stackoverflow.com/questions/39739560/how-to-access-the-vm-created-by-dockers-hyperkit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!