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?

  • Sharing directories in a Docker container both with a Dockerfile and after the container is running
  • Configuring nginx in a single docker container environment (AWS ElasticBeanstalk)
  • jps command not found. Put the JDK's jps binary on the command path
  • Docker: use file in local folder
  • How can I modify configuration file variables of the PostgreSQL service in GitLab CI?
  • Deploying an Angular app using Docker/Dokku
  • Mounting a Laravel's .env file into a Docker container
  • Change IP address pool of docker bridge
  • Docker container returns “unknown” for “uname -p” command
  • Docker difference in start and stop times
  • Docker DNS for Service Discovery to resolve Windows Container´s address by name does not work consistently
  • Use host networking and additional networks in docker compose
  • 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.