新安装的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 <your username>
#Also, you can use USER environment variable like:
$ sudo usermod -aG docker $USER