Normally if you try to run docker command without sudo you will get an error (permission error) because by default docker needs to run under root privilege. But there is a trick that will allow you to run docker command without sudo.
How to run docker without sudo
- open command line/terminal
- add the docker group if it doesn't already exist
sudo groupadd docker
sudo gpasswd -a $USER docker
newgrp docker
docker ps