简体   繁体   English

无法连接到 Docker 守护进程 - Windows 10 WSL

[英]Cannot Connect to Docker Daemon - Windows 10 WSL

I am using Ubuntu Bash is windows 10. I have been struggling with connecting to the Docker Daemon.我正在使用 Ubuntu Bash 是 windows 10。我一直在努力连接到 Docker 守护进程。 There has been couple of queries in the past which I followed with not luck.过去有几个问题,我没有运气就跟进了。

From the search I could see that the TCP endpoint need to be open for connection to the Docker Daemon.从搜索中我可以看到 TCP 端点需要打开才能连接到 Docker 守护进程。 Followed the following excellent posts with no luck:遵循以下优秀帖子但没有运气:

https://blog.jayway.com/2017/04/19/running-docker-on-bash-on-windows/ https://blog.bigfont.ca/run-docker-from-the-wsl/ https://blog.jayway.com/2017/04/19/running-docker-on-bash-on-windows/ https://blog.bigfont.ca/run-docker-from-the-wsl/

The content of the above blogs are of few months back.以上博客的内容是几个月前的。 May be process has changed for today.可能是今天的流程发生了变化。 Please guide.请指导。

从您的WSL命令行尝试以下命令:

echo "export DOCKER_HOST=tcp://localhost:2375" >> ~/.bashrc && source ~/.bashr

If you are getting wsl-2, hypervyser issues try following hacks如果您正在获取wsl-2, hypervyser issues尝试以下技巧

1) Open services from windows start menu 1)从windows开始菜单打开服务

服务

2. Click on Startup type and select Automatic 2.点击启动类型和select Automatic

在此处输入图像描述

Note:笔记:

If you are getting the issue of " Access denied " while selecting Startup type as Automatic then open your PowerShell and type the following command:如果您在将启动类型选择为自动时遇到“访问被拒绝”的问题,请打开您的 PowerShell 并键入以下命令:

(Make sure you have admin access for PowerShell) (确保您拥有 PowerShell 的管理员权限)

 Set-Service LxssManager -StartupType "Automatic"

Done, Now open your docker desktop app完成,现在打开您的 docker 桌面应用程序

在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WSL2 无法连接到 Docker 守护程序 - WSL2 Cannot connect to the Docker daemon 无法连接到 wsl 2 上的 debian buster 上的 Docker 守护进程 - Cannot connect to the Docker daemon on debian buster on wsl 2 docker:无法连接到 unix:///var/run/docker.sock 上的 Docker 守护进程。 docker 守护进程是否正在运行? Windows 10 上的 Linux Bash Shell - docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? Linux Bash Shell on windows 10 错误:作业失败(系统故障):无法连接到 unix:///var/run/docker.sock 上的 Docker 守护进程。 docker 守护进程是否正在运行? 在 Windows 10 上 - ERROR: Job failed (system failure): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? on windows 10 WSL2 中的 Docker:无法连接到位于 tcp://localhost:2375 的 Docker 守护进程。 docker 守护程序是否正在运行? - Docker in WSL2: Cannot connect to the Docker daemon at tcp://localhost:2375. Is the docker daemon running? 无法连接到 Docker 守护程序 on bash on Ubuntu windows - Cannot connect to the Docker daemon on bash on Ubuntu windows 无法连接到Docker守护程序 - Cannot connect to docker daemon 无法连接到Docker守护程序 - Cannot connect to the Docker daemon Docker 桌面无法在 Windows 10 上启动 docker 守护程序 - Docker Desktop cannot start the docker daemon on Windows 10 无法连接到 unix:///var/run/docker.sock 上的 Docker 守护进程。 docker 守护进程是否正在运行? (Ubuntu 20.04,WSL2) - Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? (Ubuntu 20.04 ,WSL2)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM