Permission denied while trying to connect to the Docker daemon socket

Thanks a lot for the answer. That definitely gave me a better picture of the issue.

Just found while I was doing my home work, based on your answer. For those interesting, this Docker documentation gives some extra details as well: https://docs.docker.com/engine/reference/commandline/dockerd/

### Daemon socket option

The Docker daemon can listen for Docker Engine API requests via three different types of Socket: unix , tcp , and fd .

By default, a unix domain socket (or IPC socket) is created at /var/run/docker.sock , requiring either root permission, or docker group membership.

Cheers!