docker 错误

 docker search ubuntu
Get http:///var/run/docker.sock/v1.20/images/search?term=ubuntu: dial unix /var/run/docker.sock: no such file or directory.
* Are you trying to connect to a TLS-enabled daemon without TLS?
* Is your docker daemon up and running?

解决方法:

原地址:http://stackoverflow.com/questions/27782595/starting-docker-containers-from-php

  • Add the docker group if it doesn't already exist.

    •   sudo groupadd docker
  • Add the connected user "${USER}" to the docker group. Change the user name to match your preferred user.

    •   sudo gpasswd -a ${USER} docker
  • Restart the Docker daemon:

    •   sudo service docker restart

  • If you are on Ubuntu 14.04 and up use docker.io instead:

    •   sudo service docker.io restart

如果还有问题就sudo reboot吧

原文地址:https://www.cnblogs.com/imeng/p/5034720.html