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

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?

  • Docker Alpine Texlive
  • Getting “broken pipe” when building Docker image using boot2docker Mac
  • Keep a self hosted servicestack service open as a docker swarm service without using console readline or readkey
  • User Registry Management in IBM Docker Container Cloud
  • docker-machine command fails on openstack
  • How to run gerrit cookbook inside docker containers?
  • How does Celery discover new Nodes?
  • Docker containers gone after a while in CoreOS
  • How can i access the website running inside a Docker container using IP address of container
  • Maven: build Docker images of children projects
  • Why do I get an authorization error from Docker when I'm trying to pull a public image?
  • docker-compose / nginx / SPA
  • 2 Solutions collect form web for “How to access the VM created by docker's HyperKit?”

    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):

    enter image description here

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

    I don’t necessarily want to manage it, but I at least want to look around.

    Exactly what is one supposed to do if docker messes up and loses my old stopped containers and I need to recover an old version or such?

    If I can do all of that through the local Mac OS, then fine, but it appears to me that much of this plumbing is inside the VM and access is essential for basic support tasks.

    If this isn’t the case, then what is the support solution for any issue like this?

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.