Fata[0000] Get Http:///Var/Run/Docker.Sock/V1.17/Version: Dial Unix /Var/Run/Docker.Sock

FATA[0000] Get http:///var/run/docker.sock/v1.17/version: dial unix /var/run/docker.sock

I had similar problem on Ubuntu 14.04, 3.13.0-39-generic
The solution was:

sudo apt-get install apparmor

service docker restart

Docker error dial unix /var/run/docker.sock: no such file or directory

It can depend on the shell you are using (for instance, fish shell would only be supported in docker toolbox 1.8.2a)

Issue 138 tried:

  1. Deleted anything in the system that mentions docker.
  2. Installed toolbox 1.8.1c.
  3. Ran the Docker Quickstart Terminal (which failed).
  4. Deleted ~/.docker
  5. Installed docker using

Check also the permission on ~/.docker.

Installing a web application in a Docker container: dial unix /var/run/docker.sock: no such file or directory

Short answer for your specific case: don't use sudo.

Here's why:

When you use boot2docker, the docker daemon is running in a VM, essentially on a different machine. To communicate with a docker daemon on another machine, you must use the TLS connection (over HTTPS to the daemon's REST API). That's why you had to set up DOCKER_HOST and DOCKER_CERT_PATH. Since the daemon is running on a different machine, you don't need to be root to communicate with it because outgoing http connections don't require root, unlike trying to talk with the unix:///var/run/docker.sock socket.

But when you run sudo docker, suddenly you're a different user, you're root. The environment variables you set as your regular account are not set. So the docker CLI uses its default communication method: the unix socket. The socket isn't there, because the daemon is running on a different machine (the boot2docker vm). Hence the error message.

/var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?

This error occurred because I didn't restart my computer after installing docker.
Now the above command is working for me.



Related Topics



Leave a reply



Submit