Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker 安装之后找不到 /var/run/docker.sock #986

Open
wss-git opened this issue May 24, 2023 · 0 comments
Open

docker 安装之后找不到 /var/run/docker.sock #986

wss-git opened this issue May 24, 2023 · 0 comments

Comments

@wss-git
Copy link
Member

wss-git commented May 24, 2023

报错信息

Project helloworld failed to execute:

ERROR:

connect ENOENT /var/run/docker.sock

问题排查

查看文件是否存在

运行 ll /var/run/docker.sock,查看文件是否存在。如果存在跳过此问题;如果不存在可以执行以下步骤:

# 查看 ~/.docker 是否存在此文件
ll ~/.docker/run/docker.sock

# 软链到 /var/run 目录
ln -s ~/.docker/run/docker.sock  /var/run/docker.sock

Docker 客户端是否启动

image

Docker daemon 有没有启动或者当前用户没有权限访问 Docker daemon。

确认 Docker daemon 已经启动。您可以使用命令 sudo service docker status 或者 systemctl status docker 来检查 Docker daemon 的运行状态。
确认当前用户是否拥有访问 Docker daemon 的权限。如果当前用户不是 Docker 组的成员,可以尝试将其加入 Docker 组,使用命令 sudo usermod -aG docker your_username。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant