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?

  • Running atop in a docker stack
  • Docker swarm with consul
  • Is it possible to expose http ports with docker-compose?
  • Docker (under boot2docker) does not look for/find local images when building
  • Run python website on docker
  • How to install a specific version of Java 8 using Dockerfile
  • Why doesn't Docker support multi-tenancy?
  • GitLab-CI Multi Runner php composer cache
  • Can docker overlay networks bind to a single specific parent network interface?
  • Starting an app fails
  • Does virtualenv serve a purpose (in production) when using docker?
  • When does a docker container stop?
  • 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.