Docker学习笔记1:Got permission denied尝试解决

环境:ubuntu16.04
背景:拉取镜像时,出现报错。

ylh@y:~$ docker pull yz16/my_ros
Using default tag: latest
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.24/images/create?fromImage=yz16%2Fmy_ros&tag=latest: dial unix /var/run/docker.sock: connect: permission denied

解决办法,在指令前添加sudo

ylh@y:~$ sudo docker pull yz16/my_ros
Using default tag: latest
latest: Pulling from yz16/my_ros
d3938036b19c: Pull complete 
a9b30c108bda: Pull complete 
67de21feec18: Pull complete 
817da545be2b: Pull complete 
d967c497ce23: Pull complete 
fbf6bc04ecfe: Pull complete 
d9f6c567cbfd: Pull complete 
41ce9513a919: Pull complete 
c8ea7a81e0c4: Pull complete 
07430024c8bf: Pull complete 
be56ee82f85e: Pull complete 
e8265f2d3164: Pull complete 
74fddc42dfed: Pull complete 
67edf8f5d129: Pull complete 
b404914d5053: Pull complete 
e6e75faa399f: Pull complete 
383b1ea94fbb: Pull complete 
fc8c94dc07ef: Pull complete 
09e10939de54: Pull complete 
c0db6acfe2ed: Pull complete 
1a55d1e19846: Pull complete 
Digest: sha256:c50d60858487ae5bd936e91d279b8c479eed497842f1ec2ea998a849ee47a6a9
Status: Downloaded newer image for yz16/my_ros:latest
docker.io/yz16/my_ros:latest
ylh@y:~$ 

#########################
不积硅步,无以至千里
好记性不如烂笔头

你可能感兴趣的:(Docker)