You can use docker commands without
sudo by creating a
docker group and then adding yourself to said group.
1 2 sudo groupadd docker sudo usermod -aG docker $USER
This is of course in the docs, but I usually forget this when I install docker on a new computer. You’ll need to re-log after adding yourself to the group, and bounce the docker service if need be.
1 sudo service docker restart