Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

like image 710
NehaG Avatar asked Mar 30 '15 14:03

NehaG


People also ask

What does VAR run Docker sock do?

sock is basically the Unix socket the Docker daemon listens on by default. It is also a tool used to communicate with the Docker daemon from within a container. Sometimes, containers need to bind mount the /var/run/docker.

What is Docker TLS?

Docker supports using TLS certificates (both on the server and the client) to provide proof of identity. When set up correctly it will only allow clients/servers with a certificate signed by a specific CA to talk to eachother.

How can I tell if Docker daemon is running?

The operating-system independent way to check whether Docker is running is to ask Docker, using the docker info command. You can also use operating system utilities, such as sudo systemctl is-active docker or sudo status docker or sudo service docker status , or checking the service status using Windows utilities.


2 Answers

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

like image 175
NehaG Avatar answered Sep 20 '22 19:09

NehaG


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 
like image 20
cstroe Avatar answered Sep 23 '22 19:09

cstroe