Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Is your docker daemon up and running?" Problems with docker hello world tutorial on Linux

Tags:

I am running the installation tutorial for Docker on Linux - Ubuntu 14.04

Going step by step through the tutorial, I get the following error message:

docker run hello-world

Post http:///var/run/docker.sock/v1.20/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?
* Is your docker daemon up and running?

The similar question docker error: /var/run/docker.sock: no such file or directory refers to boot2docker which I am not using

like image 525
john mangual Avatar asked Sep 06 '15 16:09

john mangual


People also ask

How does the Docker daemon work?

The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.

How does Docker generate the Hello-World message?

To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading.

How to fix Docker run Hello-World not working in SLES 12?

In linux, after installation, though docker version was giving a proper output, docker run hello-world was not working because the service was not up. I tried service docker restart in SLES 12 SP3 Linux machine. It worked. So probably your docker daemon needs a restart. Try the same command service docker restart and it should work.

Why can't I run any Docker commands as Sudo?

You don't need to run any docker commands as sudo when you're using boot2docker as every command passed into the boot2docker VM runs as root by default. You're seeing the error when you're running as sudo because sudo doesn't have the DOCKER_HOST env set, only your user does. And looking for DOCKER_HOST in each output.


2 Answers

Had the same issue, solved:

docker-machine start default
eval "$(docker-machine env default)"
like image 116
E-Xor Avatar answered Sep 28 '22 09:09

E-Xor


I got the same problem today. you just have to start the service.

sudo service docker start

It works on linux. I don't know if it works on mac

like image 22
BoumTAC Avatar answered Sep 28 '22 10:09

BoumTAC