search

Home  >  Q&A  >  body text

Ubuntu 运行 docker 的问题

最近在玩docker。按照 [1] 的方法安装 docker 之后。运行 docker 命令:如 docker search ubuntu 会产生如下错误:

2014/06/30 20:56:26 dial unix /var/run/docker.sock: no such file or directory

哪里错了?

  1. http://xmodulo.com/2014/05/manage-linux-containers-docker-ubuntu.html
巴扎黑巴扎黑2808 days ago1069

reply all(7)I'll reply

  • PHPz

    PHPz2017-04-21 10:58:03

    . . Your Docker is not running.

    reply
    0
  • 迷茫

    迷茫2017-04-21 10:58:03

    You can check whether your user is in the docker用户组, /var/run/docker.sock的访问权限只rootdocker用户组, 所以你需要把自己的用户添加到dockergroup below,
    Command: sudo gpasswd -a ${uesrname} docker

    reply
    0
  • PHPz

    PHPz2017-04-21 10:58:03

    What is the version of ubuntu? It is recommended to install through the ubuntu entry on docker.com and select the installation steps corresponding to the correct version number.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-21 10:58:03

    The docker service must be started first

    reply
    0
  • 黄舟

    黄舟2017-04-21 10:58:03

    Run first

    sudo docker -d -H unix:///var/run/docker.sock
    

    Start service

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-21 10:58:03

    Use env to see if there is any problem with your environment variable settings. Pay attention to whether sudo is used.
    $ export DOCKER_TLS_VERIFY=1
    $ export DOCKER_HOST=tcp://192.168.59.103:2376
    $ export DOCKER_CERT_PATH=/Users/myusername/.boot2docker/certs/boot2docker-vm

    reply
    0
  • 怪我咯

    怪我咯2017-04-21 10:58:03

    sudo docker search ubuntu

    reply
    0
  • Cancelreply