首页 > 解决方案 > 为什么 Docker 无法在 Windows 10 Home 中检测到 WSL 2 发行版?

问题描述

我已经按照官方网站上的说明将 docker 与 WSL 2 一起使用,并且我已经为 WSL 2 发行版安装了 Ubuntu 18.04。我认为 docker 可以自动检测我的发行版,所以我可以选择在我的 docker 桌面中使用哪个发行版。我一直在寻找这个问题,但仍然没有得到解决方案。请帮忙,谢谢。

这是 WSL 集成页面,我已将我的 ubuntu 18.04 设置为默认值,但仍然没有运气。 Docker WSL 集成页面

这是我拥有的 wsl 2 发行版列表

列出我拥有的 WSL 2 发行版

这是我的 docker 版本,它是最新的。 码头工人版本

因此,我无法访问 docker 容器,它说

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

标签: windowsdockerubuntu-18.04windows-subsystem-for-linuxwsl-2

解决方案


我相信这是因为 Docker Desktop for Windows 的公共版本还不支持向后移植的 WSL 2 支持。Edge/beta 版可以。


推荐阅读