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?

  • Connect to HBase running in Docker
  • How to persist data using postgres docker image?
  • No goals have been specified for this build.
  • Dockerized MongoDB on Heroku?
  • Docker for non-code deployments?
  • Multiple Websites and PHP Versions with Docker-Compose
  • Docker process suspends and gets killed
  • Cant produce-to OR consume-from kafka broker running inside a container
  • cannot ping container in another host with docker consul
  • Can't connect to docker daemon when starting a container, but docker info returns information
  • Restcomm RVD is not running from docker container
  • Can't install pip packages inside a docker container with Ubuntu
  • 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.