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

新安装的docker 可能会遇到这种问题:

$ docker version
Client:
 Version:      1.9.1
 API version:  1.21
 Go version:   go1.4.2
 Git commit:   a34a1d5
 Built:        Fri Nov 20 13:12:04 UTC 2015
 OS/Arch:      linux/amd64
#Cannot connect to the Docker daemon. Is the docker daemon running on this host?

$ docker images  或
$ docker search ubuntu

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

我们可以这样做:

#You need to add your current user to docker group like following:
$ sudo usermod -aG docker 

#Also, you can use USER environment variable like:
$ sudo usermod -aG docker $USER

原文来自:
http://stackoverflow.com/questions/34471074/cannot-connect-to-the-docker-daemon-is-the-docker-daemon-running-on-this-host

你可能感兴趣的:(Docker-Linux-03-Cannot connect to the Docker daemon. Is the docker daemon running on this host?)