dongfang123456
2023-09-27 21:08 deepin
不知道怎么办了,找不到哪里出了问题。修改源也找不到地方修改
Reply Like 0 View the author
不知道怎么办了,找不到哪里出了问题。修改源也找不到地方修改
进终端重启下试试
sudo systemctl restart docker.service
补一个sudo ?
改了什么配置文件了吗
daemon.json OR docker.service
执行id看看当前用户是否属于docker用户组。
非docker用户组需要在前面加sudo
#添加当前用户到docker组
sudo gpasswd -a ${USER} docker
#给sock文件添加权限
sudo chmod a+rw /var/run/docker.sock
#重启docker服务
sudo systemctl restart docker
还有一个办法简单看到直接的启动失败错误信息:root用户身份直接运行这个命令
/usr/bin/dockerd
就会打印错误原因。
一般都是因为配置文件内容错误引起的
cyz@cyz-PC:~$ sudo systemctl restart docker.service
请输入密码:
验证成功
Failed to restart docker.service: Unit docker.service is masked.
还有一个办法简单看到直接的启动失败错误信息:root用户身份直接运行这个命令
/usr/bin/dockerd
就会打印错误原因。
一般都是因为配置文件内容错误引起的
cyz@cyz-PC:~$ sudo su
请输入密码:
验证成功
root@cyz-PC:/home/cyz# /usr/bin/dockerd
bash: /usr/bin/dockerd: 没有那个文件或目录
root@cyz-PC:/home/cyz#
你可能需要这个:http://linux.xyunc.cn/2023/09/13/docker/
Popular Events
More
cyz@cyz-PC:~$ docker info
Client:
Debug Mode: false
Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
cyz@cyz-PC:
$ docker version$ ^CClient: Docker Engine - Community
Version: 19.03.8
API version: 1.40
Go version: go1.14.2
Git commit: 1b4342cd4c
Built: Fri Jun 19 03:26:58 2020
OS/Arch: linux/amd64
Experimental: false
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
cyz@cyz-PC:
cyz@cyz-PC:~$