title: Installing a web application in a Docker container: dial unix /var/run/docker.sock: no such file or directory
body: <p>I'm trying to install a web application in a Docker container.</p>
  
  <p>I'm using OS X Yosemite version 10.10.1 </p>
  
  <p>I've been following the tutorial on Dockerizing a Node.js Web App here: <a href="https://docs.docker.com/examples/nodejs_web_app/" rel="noreferrer">https://docs.docker.com/examples/nodejs_web_app/</a></p>
  
  <ol>
  <li><p>I downloaded and set up the boot2docker osx-installer at: github.com/boot2docker/osx-installer/releases/tag/v1.4.1</p></li>
  <li><p>I entered these commands in the console in the following order: </p>
  
  <p><code>$ boot2docker init
  $ boot2docker start 
  $ (boot2docker shellinit)</code></p></li>
  <li><p>Then I set the environmental variable, as instructed by the terminal, with the following commands:</p>
  
  <p><code>$ export DOCKER_TLS_VERIFY=1
  $ export DOCKER_HOST=tcp://192.168.59.103:2376
  $ export DOCKER_CERT_PATH=/Users/myusername/.boot2docker/certs/boot2docker-vm</code></p></li>
  </ol>
  
  <p>At this point, everything seemed to be working alright.</p>
  
  <ol start="4">
  <li><p>Then, following the tutorial on Dockerizing a Node.js app, I got to the point here: <a href="https://docs.docker.com/examples/nodejs_web_app/#building-your-image" rel="noreferrer">https://docs.docker.com/examples/nodejs_web_app/#building-your-image</a>, where you enter the command:</p>
  
  <p><code>$ sudo docker build -t &lt;your username&gt;/centos-node-hello .</code></p></li>
  <li><p>Then is asks for a password, and then after entering it I keep getting this error message:</p>
  
  <p><code>Sending build context to Docker daemon 
  FATA[0000] Post http:///var/run/docker.sock/v1.16/build?rm=1&amp;t=myusername%2Fcentos-node-  hello: dial unix /var/run/docker.sock: no such file or directory</code></p></li>
  </ol>
  
  <p>Here are my env variables:</p>
  
  <pre><code>`TERM_PROGRAM=Apple_Terminal
  TERM=xterm-256color
  SHELL=/bin/bash
  TMPDIR=/var/folders/vb/vmd78vk57mqd6fv7sqb544pc0000gn/T/
  DOCKER_HOST=tcp://192.168.59.103:2376
  Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.BBIW525XNA/Render
  TERM_PROGRAM_VERSION=343
  OLDPWD=/Users/myusername/Desktop
  TERM_SESSION_ID=FAD1F3F1-35DF-4183-A47A-08749EAFEACB
  USER=myusername
  SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.A6ZjHwx8eq/Listeners
  __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
  DOCKER_TLS_VERIFY=1
  PATH=/Users/myusername/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
  PWD=/Users/myusername/Desktop/docker
  LANG=en_CA.UTF-8
  vXPC_FLAGS=0x0
  XPC_SERVICE_NAME=0
  DOCKER_CERT_PATH=/Users/myusername/.boot2docker/certs/boot2docker-vm
  HOME=/Users/myusername
  SHLVL=1
  LOGNAME=myusername
  DISPLAY=/private/tmp/com.apple.launchd.IesbS7VdCy/org.macosforge.xquartz:0
  SECURITYSESSIONID=186a5
  _=/usr/bin/env`
  </code></pre>
  
  <p>My Docker version:</p>
  
  <pre><code>`Client version: 1.4.1
  Client API version: 1.16
  Go version (client): go1.3.3
  Git commit (client): 5bc2ff8
  OS/Arch (client): darwin/amd64
  Server version: 1.4.1
  Server API version: 1.16
  Go version (server): go1.3.3
  Git commit (server): 5bc2ff8`
  </code></pre>
  
  <p>Any help would be really appreciated. Thanks</p>