permission denied /var/run/docker.sock

Your user is not allowed to talk to the Docker daemon

why

The daemon socket is owned by root and the docker group. A user outside that group gets permission denied for every command, including docker ps.

what to do

Add yourself to the group (sudo usermod -aG docker $USER) and then log out and back in — group membership is only picked up by a new session. On shared HPC systems Docker is usually not permitted at all; use Singularity/Apptainer there instead.

Docker daemon permissions
This is one entry from BioErrors, a catalogue of bioinformatics error messages that point at the wrong thing. Every entry was traced to its real cause before it was written down.
If your error is not in it, paste it there and it gets traced and added.