2017-08-29 135 views
0
[email protected]:~$ 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.30/images/json: dial unix /var/run/docker.sock: connect: permission denied 


[email protected]:~$ sudo docker images 

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 
[email protected]:~$ 
+1

码头守护程序是否正在运行? – whites11

+0

此前,无论何时我会默认运行该命令,deamon都会执行,但是,我不知道它停止了哪些更改。 – Invictus

回答

1

安装docker后,默认情况下它未运行。假设这是Ubuntu的16.04

你需要运行,下面开始搬运工

$ sudo systemctl start docker 

及以下设置它在启动时自动

$ sudo systemctl enable docker 
+0

谢谢,但它有点令人惊讶。之前它会默认启动。我不知道什么改变了?请,你能帮忙回答吗? – Invictus

0

要检查泊坞窗是否正在运行$sudo systemctl status docker

如果未运行,则使用$sudo systemctl enable docker启用它并使用$sudo systemctl start docker