'/var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
I am very new to the docker when try to run docker info it gives me following error.
$ docker info
FATA[0000] Get http:///var/run/docker.sock/v1.17/info: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
I am using ubuntu 14.04. I followed the installation istructions mentioned on https://docs.docker.com/installation/ubuntulinux/#installing-docker-on-ubuntu
But I'm still getting the error. How can I fix this?
Solution 1:[1]
This error occurred because I didn't restart my computer after installing docker. Now the above command is working for me.
Solution 2:[2]
This is because the docker service is not automatically started after an install.
You can start the docker service in Ubuntu and its derivatives (looking at you Linux Mint) by typing:
sudo service docker start
To check that docker started, this file should exist:
ls -la /var/run/docker.sock
Solution 3:[3]
I had a similar issue, restarting didn't work. Running docker -d gave me a different error
Error loading docker apparmor profile: exec: "/sbin/apparmor_parser": stat /sbin/apparmor_parser: no such file or directory ()
and ran
sudo apt-get install apparmor
to fix the apparmor error
My guess the daemon didn't get started automatically post-install because of the apparmor error. (Your error might be different)
Env: Linux Mint 17.1
Update: Also make sure the user you are using is in the docker group
Solution 4:[4]
I had the same problem. I needed add my user to docker group (on /etc/group or uses sudo gpasswd -a user docker - and restarting the session.
OS: Ubuntu 14.04.2 LTS 3.13.0-57-generic x64
Solution 5:[5]
After starting docker. change the owner file with this command:
sudo chown [user]:docker /var/run/docker.sock
if your problem didn't solve after it.
sudo mkdir -p /etc/systemd/system/docker.service.d
then
sudo vim /etc/systemd/system/docker.service.d/options.conf
add this line to options.conf file
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H unix:// -H tcp://0.0.0.0:2375
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Austin Lopez |
| Solution 2 | cstroe |
| Solution 3 | |
| Solution 4 | rogerio_gentil |
| Solution 5 |
