不root时出错:无法连接到Docker守护程序。 docker守护程序是否在此主机上运行?

时间:2018-01-29 17:43:02

标签: docker

为什么我收到此消息?

Cannot connect to the Docker daemon. Is the docker daemon running on this host?

如果以root身份运行,我不会收到此消息,但

[root@mymachine redisc]# whoami
root
[root@mymachine redisc]# docker version
Client:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:        
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:        
 OS/Arch:      linux/amd64
[root@mymachine redisc]# sudo su myuser
[myuserp@mymachine redisc]$ docker version
Client:
 Version:      1.12.1
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   23cf638
 Built:        
 OS/Arch:      linux/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

如何运行dockerd以便所有用户都可以访问它(而不仅仅是root用户?)

0 个答案:

没有答案