我在Ubuntu上运行WSL 2,尝试在计算机上使用Docker时遇到了问题。我已经安装并在后台运行了Docker Desktop,并启用了与Ubuntu的WSL集成。
当我尝试运行简单的docker命令,例如
``` The command 'docker' could not be found in this WSL 2 distro. We recommend to activate the WSL integration in Docker Desktop settings.
For details about using Docker Desktop with WSL 2, visit: https://docs.docker.com/go/wsl2/ ```
我已经访问了此链接,并按照给出的所有说明启用了与Ubuntu的WSL集成,如下图所示: 但是我收到的错误仍然是相同的。有人知道如何解决这个问题吗?
注意:我可以在PowerShell和命令提示符中运行Docker命令(如
当我尝试运行简单的docker命令,例如
docker --version
时,会收到以下错误提示:``` The command 'docker' could not be found in this WSL 2 distro. We recommend to activate the WSL integration in Docker Desktop settings.
For details about using Docker Desktop with WSL 2, visit: https://docs.docker.com/go/wsl2/ ```
我已经访问了此链接,并按照给出的所有说明启用了与Ubuntu的WSL集成,如下图所示: 但是我收到的错误仍然是相同的。有人知道如何解决这个问题吗?
注意:我可以在PowerShell和命令提示符中运行Docker命令(如
docker --version
),但在Ubuntu中无法识别。
wsl -l -v
的输出。 - JeffRSon