Docker on OSX: Client Connection Error

If you have installed Docker 0.8 and set it up on OSX, you’ll notice it’s a bit rough. One issue you might run into is the following error:

$ docker version
Client version: 0.8.0
Go version (client): go1.2
Git commit (client): cc3a8c8
2014/02/06 22:50:31 dial unix /var/run/docker.sock: no such file or directory

The issue here is that you followed the installation instructions literally and ran export DOCKER_HOST=tcp:// in your shell. Unfortunately, that export does not persist so the next time you open a console the DOCKER_HOST variable is not set so the docker client does not know how to reach the server. If you either add it to your .bash_profile or run it again in the current shell you will see it work as expected:

$ docker version
Client version: 0.8.0
Go version (client): go1.2
Git commit (client): cc3a8c8
Server version: 0.8.0
Git commit (server): cc3a8c8
Go version (server): go1.2
Advertisements

One thought on “Docker on OSX: Client Connection Error

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s