Sunday, January 29, 2017

Is Docker daemon running error? Can not connect to the Docker daemon error..

Did you get this error after installing Docker on any of Redhat Linux OS or Amazon Machine image?
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.

See 'docker run --help'.

Fix for the above issues:

Just do the below to fix the error..

Firstly make sure docker daemon is running by executing the below command..
> service docker status
After executing if see you some thing like this, docker is not yet started.
docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: https://docs.docker.com

you can start by executing the below command:

>service docker start

 docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: active (running) since Sun 2017-01-29 13:40:17 EST; 1s ago     Docs: https://docs.docker.com
 Main PID: 30319 (dockerd)

> service docker status

Now you should see docker daemon is running.
now execute the below command to run hello world docker image.
> sudo docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.



No comments:

Post a Comment