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.
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: