Found the answer on stackoverflow
https://stackoverflow.com/a/68663970
The issue is the current login user cannot access docker.
Open your terminal and enter the command below to give the required permission to the user to access docker directly.
$ sudo groupadd docker
$ sudo gpasswd -a $USER docker
$ sudo service docker restart
Once it’s all done, then try below command without sudo to see if it works
$ docker ps
If not, then try to reboot your machine.
搶先發佈留言