Search code examples
dockerboot2docker

Docker initialization on OSX: is a dial error normal?


I ran boot2docker for the first time. At the end of the /usr/local/bin/boot2docker up process, I got the following:

Get http:///var/run/docker.sock/v1.19/version: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
bash-4.3$ 

Do I worry?


Solution

  • That indicates that something is wrong.

    The "dial unix..." error is saying that the docker executable is failing to connect. You'll mostly get this if the VM isn't running or isn't configured correctly. In this case, it looks like the docker service on the VM had some problem and the error is coming from inside the VM (that's why it's /var/run/docker.sock instead of an https connection to the VM).

    It's not possible to diagnose without more logs, but I recommend docker-machine as the new replacement for boot2docker. (It still runs the boot2doocker distro, but it's a little more sophisticated at setting up the VM.)