executei o comando
sudo usermod -aG docker $(whoami)
como tem no material do curso, mas me smo assim preciso dar um sudo pra poder utilizar o docker.
Segue cli de teste:
henriquelssantiago@henriquelssantiago:~$ sudo usermod -aG docker $(whoami)
[sudo] password for henriquelssantiago:
henriquelssantiago@henriquelssantiago:~$ docker run ubuntu
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.35/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
henriquelssantiago@henriquelssantiago:~$
henriquelssantiago@henriquelssantiago:~$ sudo usermod -aG docker $(whoami)
henriquelssantiago@henriquelssantiago:~$ docker run ubuntu
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.35/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
henriquelssantiago@henriquelssantiago:~$ sudo docker run ubuntu
henriquelssantiago@henriquelssantiago:~$ docker ps -a
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/containers/json?all=1: dial unix /var/run/docker.sock: connect: permission denied
henriquelssantiago@henriquelssantiago:~$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4fbcd012f5e8 ubuntu "/bin/bash" 13 seconds ago Exited (0) 11 seconds ago hungry_austin
henriquelssantiago@henriquelssantiago:~$ sudo usermod -aG docker $(whoami)
henriquelssantiago@henriquelssantiago:~$