The answer is simple— we are trying to run Docker as a non-root user. I want to run the Docker Engine with my user “faisal” and unfortunately, this user does not have the needed permissions. Therefore, every time running Docker as a non-root user, I have to use sudo and put the sudo password for the user “faisal”.
If you want to replicate this error, simply run any docker command without sudo.
docker images
This command lists the images available locally on your virtual machine.
Can you see the permission denied error below?