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:
- Deleted anything in the system that mentions docker.
- Installed toolbox 1.8.1c.
- Ran the Docker Quickstart Terminal (which failed).
- Deleted ~/.docker
- 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
Linux Sed Command - Using Variable with Backslash
How to Make a Built-In Device Driver in Linux
How to Get the Current Network Interface Throughput Statistics on Linux/Unix
How to Get Diff Between All Files Inside 2 Folders That Are on the Web
Skipping Acquire of Configured File 'Main/Binary-I386/Packages'
Home/End Keys Do Not Work in Tmux
How to Change File Permissions in Ubuntu
How the Util of iOStat Is Computed
How to Delete a User in Linux When the System Says Its Currently Used in a Process
How to Install Maven into Red Hat Enterprise Linux 6
Rtmp: Is There Such a Linux Command Line Tool
Linux: How to Force a Specific Network Interface to Be Used
How to Programmatically Switch to a Specific Window in Compiz
Running as a Host User Within a Docker Container
Why Linux Kernel Zone_Normal Is Limited to 896 Mb
Git Forces Refresh Index After Switching Between Windows and Linux