[英]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.