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 dockeruse: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 ...
随机推荐
- logj4.xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration PU ...
- SSM-Maven配置
全配置 新建项目 新建文件夹 - src - main - java - resources - webapp - WEB-INF - index.jsp - pom.xml <?xml ver ...
- jQuery新的事件绑定机制on()示例应用
投稿:whsnow 字体:[增加 减小] 类型:转载 从jQuery1.7开始,jQuery引入了全新的事件绑定机制,on()和off()两个函数统一处理事件绑定,下面通过示例为大家介绍下 ...
- Java图形与文本(18)
实例018 旋转图形 实例说明 本实例演示在Java中绘制图形时,如何对图形进行旋转.运行程序,单击窗体上的“顺时针”按钮,可以将图形顺时针旋转,效果如图1.18所示,用户还可以通过单击“逆时针”和 ...
- PCS 7 V9.0 SP1安装过程截图
- du与df的区别
我们知道,磁盘的整体数据是记录在superblock中的,但是每一个文件的容量信息则在inode当中记载的.因此,引出了两个查看这些数据信息的命令: df:列出文件系统的整体磁盘使用量.由于df主要读 ...
- swoole之建立 tcp server
一.swoole的安装 参照官网:https://wiki.swoole.com/wiki/page/6.html 二.代码部分 服务端: <?php $host = "127.0.0 ...
- firewalld学习--维护命令
启动 systemctl start firewalld 停止 systemctl stop firewalld 重启 systemctl restart firewalld 查询状态 systemc ...
- PAT (Advanced Level) 1128~1131:1128N皇后 1129 模拟推荐系统(set<Node>优化) 1130 中缀表达式
1128 N Queens Puzzle(20 分) 题意:N皇后问题.按列依次给定N个皇后的行号,问N个皇后是否能同时不存在行冲突.列冲突和主副对角线冲突. 分析: 1.根据题意一定不存在列冲突,所 ...
- LInux的服务器编码格式的查看与更改
1.locale 命令查看字符编码 然后修改/etc/sysconfig/i18n,如改成中文编码: LANG=en_US.UTF-8 改为 LANG="zh_CN.GBK" 然后 ...