Connect to Docker for Mac Alpine Host

The new Docker for Mac (mid-2016) doesn’t work the same way as previous versions or the native linux version. To interact with the Docker Host VM, instead of SSH, you can use:

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

and login with root user. No password should be required.

You can also get networking, etc info about the host by querying a container host-networked like so:

docker run --rm --privileged --net=host alpine ifconfig

Leave a Reply