Change the access permission of the docker.sock file
chmod 777 /var/run/docker.sock
or u can use sudo
in the start of the command.
chmod 777
will allow all actions for all users while chmod 666
will allow all users to read and write but cannot execute the file.