If you follow a ‘normal’ install of docker via the install guide, you add yourself to the docker group to get permissions as a normal user to run the docker commands. If you install on Ubuntu with snap however, you still get error:
permission denied while trying to connect to the docker API at unix:///var/run/docker.sock
Per this post, you need to run this to give yourself permissions:
sudo setfacl --modify user:[your-user-id]:rw /var/run/docker.sock
