By default, the docker command can only be run the root user or by a user in the docker group, which is automatically created during Docker’s installation process. If you attempt to run the docker command without prefixing it with sudo or without being in the docker group, you’ll get an error saying "Got permission denied while trying to connect to the Docker daemon socket"
This is a short demo on how to execute the Docker command without sudo.
I use DigitalOcean for all of my demos, you can use the link below to get a free $100 credit and spin up your own Linux servers!
https://m.do.co/c/2a9bba940f39
Twitter: / bobbyiliev_
Website: https://bobbyiliev.com