Cannot connect to the Docker daemon

Question

docker images
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Answer

Change /etc/docker/daemon.json From

{
    "dns": ["8.8.8.8"],
}

to

{
    "dns": ["8.8.8.8"]
}
sudo systemctl restart docker

This command saved my life:

sudo dockerd

unable to configure the Docker daemon with file /etc/docker/daemon.json: invalid character '}' looking for beginning of object key string
0%