willzhao@ideapad:~$ docker images
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.40/images/json: dial unix /var/run/docker.sock: connect: permission denied
执行sudo docker xxx命令,会提示输入当前账号密码,然后可以成功:
willzhao@ideapad:~$ sudo docker images
[sudo] willzhao 的密码:
REPOSITORY TAG IMAGE ID CREATED SIZE
bolingcavalry/probedemo 0.0.1 803f83e12d88 3 hours ago 508MB
hello-world latest bf756fb1ae65 5 months ago 13.3kB
openjdk 8u212-jdk-stretch 03b20c1fa768 11 months ago 488MB
willzhao@ideapad:~$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
bolingcavalry/probedemo 0.0.1 803f83e12d88 4 hours ago 508MB
hello-world latest bf756fb1ae65 5 months ago 13.3kB
openjdk 8u212-jdk-stretch 03b20c1fa768 11 months ago 488MB