Docker Docker 安装后 报 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 解决办法

白纸 · 2017年07月20日 · 最后由 rocl 回复于 2017年12月26日 · 9781 次阅读

问题
刚在新的Centos上安装Docker-CE,后运行docker run hello-world报错Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

解决办法
$ systemctl daemon-reload
$ sudo service docker restart
$ sudo service docker status (should see active (running))
$ sudo docker run hello-world

 
转载文章时务必注明原作者及原始链接,并注明「发表于 TesterHome 」,并不得对作品进行修改。
共收到 4 条回复时间 点赞
 

你这是网管大法,直接重启。 好歹贴个docker 的log,分析一下到底是什么错误。

 
白纸 #2 · 2017年07月20日 作者

@ycwdaaaa 就行 新安装Docker 不行,看github issues 撕了半天 也没撕出个所以然来,能力尚浅,分析不出来

 

docker 客户端通过unix:///var/run/docker.sock与docker daemon通信,unix:///var/run/docker.sock需要管理员权限才能访问,所以要么运行sudo docker run hello-world,要么将当前用户添加在docker用户组中 
sudo usermod -aG docker $USER

 

对的,lkx正解,权限没加。关于这一点,docker doc有明确提到

 

【转载】Docker 安装后 报 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 解决办法的更多相关文章

  1. docker安装后出现Cannot connect to the Docker daemon

    启动docker service docker start docker安装后出现Cannot connect to the Docker daemon You need to add user in ...

  2. docker 报错: Cannot connect to the Docker daemon at unix:///var/run/docker.sock.

    最近在 Windows 子系统 WSL 上面安装了一个 ubuntu18.04, 安装完docker 跑 hello-world 的时候报错了 docker: Cannot connect to th ...

  3. php fpm安装curl后,nginx出现connect() to unix:/var/run/php5-fpm.sock failed (13: Permission denied)的错误

    这里选择直接apt-get安装,因为比起自己编译简单多了,不需要自己配置什么 #sudo apt-get install curl libcurl3 libcurl3-dev php5-curl 安装 ...

  4. docker安装出现"Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"

    今天按照这个教程使用WSL安装docker时遇到了个问题: 使用命令:$ docker search mysql 出现:Cannot connect to the Docker daemon at u ...

  5. docker报错Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

    docker报错Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon run ...

  6. Docker未启动错误:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

    此问题是因为Docker安装后未启动所致,执行以下命令启动docker: systemctl start docker.service 具体日志如下: Connecting to ... Connec ...

  7. Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

    Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 是由 ...

  8. docker search mysql Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

    1.docker search mysql 报错 [root@localhost usr]# docker search mysqlCannot connect to the Docker daemo ...

  9. Cannot connect to the Docker daemon at unix:///var/run/docker.sock.问题解决

    出现Cannot connect to the Docker daemon at unix:///var/run/docker.sock时,先用tail -5f /var/log/upstart/do ...

随机推荐

  1. React Native小白入门学习路径——五

    React Native小白入门学习路径--五 序 "哦天呐!" 这句话成了我在实验室的口头禅, 老师可能觉得我们都是大神吧,都还在看着基础就给布置了那么多任务:写一个RN的TDD ...

  2. python流程控制之if、 while和for 循环

    1.if 语句 语法1 if 条件:# 代码1# ... # cls='human'# sex='female'# age=18## if cls == 'human' and sex == 'fem ...

  3. MySQL(九)

    封装 观察前面的文件发现,除了sql语句及参数不同,其它语句都是一样的 创建MysqlHelper.py文件,定义类 #encoding=utf8 import MySQLdb class Mysql ...

  4. 通过xml处理sql语句时对小于号与大于号的处理转换

    以上方法,很容易使用,直接ss < #{ss} 法二   <![CDATA[>=]]>表示大于等于      变量<![CDATA[ < ]]>#{变量}表示 ...

  5. yii2 Gridview网格小部件

    Gridview 网格小部件 一.特点: 1.是yii中功能最强大的小部件之一: 2.非常适合快速建立系统的管理后台. 3.用 dataProvider 键来指定数据的提供者 4.用 filterMo ...

  6. Java中Double类型的精确计算

    import java.math.BigDecimal; public class DoubleUtil { private static final int DEF_DIV_SCALE = 5; / ...

  7. 【高精度】高精度分数[c++]

    [高精度]高精度分数 时间限制: 1 Sec 内存限制: 64 MB 题目描述 "人无远虑,必有近忧"是修罗王一直以来恪守的信条,为了以防万一,他在很久以前就将<魔法宝典&g ...

  8. GMA Round 1 函数求值

    传送门 函数求值 设函数$f(x)=x^{2018}+a_{2017}*x^{2017}+a_{2016}*x^{2016}+...+a_{2}*x^2+a_{1}*x+a_{0}$,其中$a_{0} ...

  9. Cenos7 部署asp.net core站点

    系统版本 rpm -q centos-release --- centos-release--5.1804.el7.centos.x86_64 安装libicu yum install libunwi ...

  10. javaScript系列 [06]-javaScript和this

    在javaScript系列 [01]-javaScript函数基础这篇文章中我已经简单介绍了JavaScript语言在函数使用中this的指向问题,虽然篇幅不长,但其实最重要的部分已经讲清楚了,这篇文 ...