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 unix:///var/run/docker.sock. Is the docker daemon running?
进一步测试发现其他命令也都不能使用
必应搜索一番之后找到了一些解决方案:例如这个博客
$ systemctl daemon-reload
$ sudo service docker restart
$ sudo service docker status
不过我在执行第一个命令时就出现了:
System has not been booted with systemd as init system (PID 1). Can't operate
后来找到了这个issue
"Instead of using
sudo systemctl start docker
use:sudo /etc/init.d/docker start
, as of right now we do not have systemd in WSL 2."
尝试了sudo /etc/init.d/docker start
启动docker之后便不再出现片头那个问题
参考资料
https://github.com/MicrosoftDocs/WSL/issues/457
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 running? 解决办法
Docker Docker 安装后 报 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docke ...
- 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 ...
- 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? 是由 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 安装 ...
- 转connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporarily unavailable)
网站常出现502 bad gateway,程序没有问题. 根据nginx日志:connect() to unix:/var/run/php-fpm.sock failed (11: Resource ...
随机推荐
- java并发之Future与Callable使用
java并发之Future与Callable使用 这篇文章需要大家知道线程.线程池的知识,尤其是线程池. 有的时候我们要获取线程的执行结果,这个时候就需要用到Callable.Future.Futur ...
- MFC CListCtrl 显示bmp图片
m_ListCtrl.SetExtendedStyle(m_ListCtrl.GetExtendedStyle()| LVS_EX_SUBITEMIMAGES | LVS_EX_GRIDLINES); ...
- 构建javascript array包
//像一个数组添加数组. copyArray = function(inSrcArray,inDestArray){ var i; for(i=0;i<inSrcArray.length;i++ ...
- Linux centosVMware yum更换国内仓库源、yum下载rpm包、源码包安装
一.yum更换国内仓库源 cd /etc/yum.repos.d/ rm -f dvd.repo wget http://mirrors.163.com/.help/CentOS7-Base-163. ...
- 《跟老齐学Python:从入门到精通》齐伟(编著)epub+mobi+azw3
内容简介 <跟老齐学Python:从入门到精通>是面向编程零基础读者的Python入门教程,内容涵盖了Python的基础知识和初步应用.以比较轻快的风格,向零基础的学习者介绍一门时下比较流 ...
- 使用input:file控件在微信内置浏览器上传文件返回未显示选择的文件
使用input:file控件在微信内置浏览器上传文件返回未显示选择的文件 原来的写法: <input type="file" accept="image/x-png ...
- 开源Web测试工具介绍
HtmlUnitHtmlUnit 是 JUnit 的扩展测试框架之一.HtmlUnit 将返回文档模拟成 HTML,这样您便可以直接处理这些文档了.HtmlUnit 使用例如 table.form 等 ...
- python 函数map()、filter()、reduce()
map()函数 将一个列表进行遍历,对每一个字符串进行处理: 例如: num_list = ["我","是","哈哈","太 ...
- 留学Essay写作:精准用词很重要
很多觉得自己英语成绩还行的同学经常在自己的文章里用一些浮夸或者是难度特别大的词语,以显示自己的英语水平.当然了,成功了倒也无可厚非,要是有些词语用错了那可是会被别人笑掉大牙的.因此英语中的精准用词就成 ...
- hibernate部分源码解析and解决工作上关于hibernate的一个问题例子(包含oracle中新建表为何列名全转为大写且通过hibernate取数时如何不用再次遍历将列名(key)值转为小写)
最近在研究系统启动时将数据加载到内存非常耗时,想着是否有办法优化!经过日志打印测试发现查询时间(查询时间:将数据库数据查询到系统中并转为List<Map>或List<*.Class& ...