How to connect (back) docker client to host?

Hi There,
I found loads of references on how to connect docker client (running on Mac) to a docker host running in docker-machine:
$ docker-machine --driver virtualbox create dev
$ docker $(docker-machine env dev)
What I am struggling to find is how to connect back to the docker engine running ‘natively’ (hyperkit) on my machine.
I know I can open a new terminal, but it’s a bad trick, I’d like to get the proper way.

Cheers, Giovanni

This is a known limitation and not exactly clear when reading over docs. You have to find opaque references here and there:

  2. Access host (not vm) from inside container

TL;DR you have to create an alias on your loop back to a non-routable IP of your choosing, say a 172.16.x.x that doesn’t conflict.

sudo ifconfig lo0 alias

Then you access your host inside containers with for example.