博客
关于我
Linux下,Docker出现Cannot connect to the Docker daemon. Is the docker daemon running on this host错误解决办法
阅读量:806 次
发布时间:2023-02-03

本文共 391 字,大约阅读时间需要 1 分钟。

出现这种情况,有两种原因造成的,一种是服务真的没有起来,另一种是所处的用户没有权限。

不管是哪种情况,执行docker命令时,前面最好追加sudo,以防止没有权限,造成不必要的麻烦
1、服务没有起来

sudo service docker status # 查看服务的Active是否为active (running)状态sudo service docker start # 启动服务

2、所处的用户没有权限

#执行所有的命令前面加上sudosudo docker imagessudo docker pssudo docker ps -asudo docker start xxxx

使用以上两种方法,基本能够解决Cannot connect to the Docker daemon. Is the docker daemon running on this host的问题。

转载地址:http://dizfk.baihongyu.com/

你可能感兴趣的文章
mysql中出现Incorrect DECIMAL value: '0' for column '' at row -1错误解决方案
查看>>
mysql中出现Unit mysql.service could not be found 的解决方法
查看>>
mysql中出现update-alternatives: 错误: 候选项路径 /etc/mysql/mysql.cnf 不存在 dpkg: 处理软件包 mysql-server-8.0的解决方法(全)
查看>>
Mysql中各类锁的机制图文详细解析(全)
查看>>