【发布时间】:2021-06-02 14:05:37
【问题描述】:
和Ubuntu WSL with docker could not be found完全一样的问题
$ docker
The command 'docker' could not be found in this WSL 1 distro.
We recommend to convert this distro to WSL 2 and activate
the WSL integration in Docker Desktop settings.
See https://docs.docker.com/docker-for-windows/wsl/ for details.
但我的要求不同——我想要
- 坚持使用 WSL1(出于本主题之外的原因)
- 按原样使用 Docker for Windows
也就是说,我已经并行安装了 WSL1 和 Docker for Windows。这是我目前的信息:
C:> ver
Microsoft Windows [Version 10.0.18363.1379]
C:> wsl -l -v
NAME STATE VERSION
* Debian Running 1
我没有在“资源 -> WSL 集成”中看到集成,并且我没有在 Docker 桌面设置中启用 WSL2 后端。
只是我遇到了上述问题——我的docker 可以在任何地方工作,在 CMD、Powershell、git-bash 等中,只是不在我的 WSL 中。
我发现的所有解决方案都是在 WSL1 或 WSL2 中安装 Docker for Windows ,但我想保持一切原样 -- WSL 和 Docker for Windows 安装 彼此平行。
有什么解决办法吗?
【问题讨论】:
-
您是否在 Docker 桌面设置中取消选中 WSL2 后端?这样您就可以使用 Hyper-V 后端
-
@im_baby,我现在想我没有 WSL2。请参阅我更新的问题。
标签: docker windows-subsystem-for-linux