Ubuntu: problem with docker


I am trying to learn about "Docker" in ubuntu 15.04.

When I give any command using docker like "docker run image", it get the following error:

FATA[0000] Post http:///var/run/docker.sock/v1.17/containers/create: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?  

I don't understand what does it mean.


There are two possible reasons why you get this error:

  1. The Docker daemon is not running. You can check that with sudo /etc/init.d/docker status.

  2. The Docker daemon is running but is configured not to listen on /var/run/docker.sock. You can check in /etc/default/docker if any -H option is specified in DOCKER_OPTS.


After installing Docker you are prompted to add your user to the docker group. Simply run the command shown:

sudo usermod -aG docker $USER  

You will need to close your session and log in again to have the change take effect.


Try to reboot your os after docker was installed to apply group permissions, if your user joined docker group..


When Docker installing on ubuntu 14.04, the installer recomments what your user adds to Docker group to access Docker Service.

Look at

The docker daemon binds to a Unix socket instead of a TCP port. By default that Unix socket is owned by the user root and other users can access it with sudo. For this reason, docker daemon always runs as the root user. To avoid having to use sudo when you use the docker command, create a Unix group called docker and add users to it. When the docker daemon starts, it makes the ownership of the Unix socket read/writable by the docker group.

source: https://docs.docker.com/installation/ubuntulinux/#create-a-docker-group


try to use sudo docker images to check if there is a containers called <image> in your host.

running docker run <image> will start a container called <image> in your host computer, if your host computer do not have this container, then docker will auto pull a container named '' from repository hub just like the way you running docker pull <image>. Then if it still cannot found a image called '' then it will show this error message.

you can try to replace to hello-world to see if docker is working on your computer.

sudo docker run hello-world

Also, you should check if you should use sudo.


I found this article helpfull: https://docs.docker.com/articles/systemd/ ; I ran it on multiple environments and worked, hope it helps you too


I got a similar message while trying to pull an image. I just did the sudo su and was then able to pull the image successfully.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »