Can not connect to the Docker daemon. Is 'docker -d' running on this host?

Hi,

I mounted /var/run/docker.sock on container to be able to run docker commands from inside the container. But i started getting the error the below error when i run, ‘sudo docker ps’

Cannot connect to the Docker daemon. Is ‘docker -d’ running on this host?

docker version: 18.09.1

Any help on how to debug this?

Thanks

Take a look at this post -> Docker Container Get IP Address from host interfaces