Error: Cannot connect to the Docker daemon. Is the docker daemon running on this host?

If you are trying to start docker first time, you might get an error "Cannot connect to the Docker daemon. Is the docker daemon running on this host?"


This might happen because of multiple reasons.

1. You might not have permissions to to access docker
You should grant permission to use docker for specific user if he is not  root user.
In order to grant permission execute below command:

$ sudo usermod -aG docker <username>

replace <username> with actual user name. Also make sure you log off/restart machine before using docker, after executing above command.

2. Docker service might not be running

In order to re-start the docker service execute below commands

$ sudo service docker stop
$ sudo service docker start

Now you should be able to use docker.


Comments

Popular posts from this blog

How to flash CWM Recovery to Samsung Galaxy SL( GT-I9003) using Odin

How to boot Samsung Galaxy SL( GT-I9003) in recovery mode

Exception handling with RestTemplate