boot2docker FATA[0000] Virtual box host only network adapter issue. Sometimes after MAC sleeps

FATA[0000] xxxxxxx: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?

Docker SSH error
Docker SSH error

 Temporary solution.

1.Open virtualbox and check the network settings on the boot2docker vm to see what the host only adapter is named. e.g.  vboxnet0;  vboxnet1.

Named host only adapter

Then, apply this command:

sudo route -nv add -net 192.168.59 -interface vboxnet0

more on github