Quick Tip: Fixing Docker Client Error on Mac OS X
I was getting this really annoying error below when trying to install and run docker via Homebrew and boot2docker on my Mac OS X 10.9 after following the instruction available via docker documentation
Git commit (client): fb99f99 2014/05/19 17:42:19 Get http:///var/run/docker.sock/v1.11/version: dial unix /var/run/ docker.sock: no such file or directory
Turns out it happens because the Docker client can't communicate to the socket on the VM. To fix this you'll need to make the connection known to the Docker client. You need to add this to your bash profile file export DOCKER_HOST=tcp://localhost:4243 so that it's persisted for your terminal session.
Open up terminal and enter
$ echo -n "#Docker Host configuration\nexport DOCKER_HOST=tcp://localhost:4243" >> ~/.bash_profile $ source ~/.bash_profile
Test to make sure it's working run
$ docker version
The error should be gone and the output should be
Client version: 0.11.1 Client API version: 1.11 Go version (client): go1.2.1 Git commit (client): fb99f99 Server version: 0.11.1 Server API version: 1.11 Git commit (server): fb99f99 Go version (server): go1.2.1 Last stable version: 0.11.1
Hope this helps someone else, if you have any questions use the comments below or ping on twitter @mikeebinum











