Writing sudo before every docker command could be a pain in the ass. We can get around this by adding our user to the docker group.
Warning: Adding user to docker group gives that user unrestricted, non-password protected root access. It could be very dangerous and can make your system vulnerable. Here is a good article about that.
Add the docker group if it does not exist:
sudo groupadd docker
Add current user to the docker group:
sudo gpasswd -a $USER docker
Log out and log in to activate the changes.
Run some docker command without sudo to confirm if it works. For example:
docker ps