https://docs.docker.com/engine/install/debian/
Add the docker group if it doesn't already exist:
sudo groupadd dockerAdd the connected user "$USER" to the docker group. Change the user name to match your preferred user if you do not want to use your current user:
sudo gpasswd -a $USER dockerEither do a newgrp docker or log out/in to activate the changes to groups.
Test docker without sudo
docker ps -aSource: https://askubuntu.com/a/477554