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 ...
随机推荐
- 第1节 kafka消息队列:1、kafka基本介绍以及与传统消息队列的对比
1. Kafka介绍 l Apache Kafka是一个开源消息系统,由Scala写成.是由Apache软件基金会开发的一个开源消息系统项目. l Kafka最初是由LinkedIn开发,并于20 ...
- IAR 设置问题
IAR 设置问题 1.worksplace 的设置问题:edit configuration 这样,每个工程都可以有一个workplace,方便切换. 2.文件夹包含问题 3.包含.dat文件问题 . ...
- JDBC--调用函数&存错过程
1.通过Connection对象的prepareCall()方法创建CallableStatement对象的实例,在使用prepareCall()方法时需传入一个String类型的字符串,该字符串用于 ...
- 「BJWC2012」冻结
传送门 Luogu 解题思路 分层图最短路,层与层之间的边的边权减半,然后就是板子了. 细节注意事项 咕咕咕. 参考代码 #include <algorithm> #include < ...
- 「NOIP2012」开车旅行
传送门 Luogu 解题思路 第一步预处理每个点后面的最近点和次近点,然后就是模拟题意. 但是如果就这么搞是 \(O(N^2)\) 的,不过可以过70分,考场上也已经比较可观了. 考虑优化. 预处理最 ...
- docker for windows 容器内网通过独立IP直接访问的方法
Docker官方推荐我们通过端口映射的方式把Docker容器的服务提供给宿主机或者局域网其他容器使用.一般过程是: 1.Docker进程通过监听宿主机的某个端口,将该端口的数据包发送给Docker容器 ...
- SpringBoot 解决“不支持发行版本xx”的问题
原因:很多地方都要配置jdk版本,某些地方配置的jdk版本不同.比如你要使用jdk8,某些地方配成了jdk7. 最常见配置错的地方:Ctrl+Shift+Alt+S 如果没问题,查看Project中的 ...
- [翻译]使用Visual Studio Code怎样调试Rust
我将 Visual Studio Code 作为Rust首选编辑器.遗憾的是 VS Code 不能非常好地完成 Rust 的调试. 配置调试器不难,但仍然需要几个步骤.我已经完整配置了好几次.我正在写 ...
- java创建线程方式
1.继承Thread类 public class ThreadCreator extends Thread{ public static void main(String[] args) { //第一 ...
- sklearn中实现多分类任务(OVR和OVO)
sklearn中实现多分类任务(OVR和OVO) 1.OVR和OVO是针对一些二分类算法(比如典型的逻辑回归算法)来实现多分类任务的两种最为常用的方式,sklearn中专门有其调用的函数,其调用过程如 ...