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.
For details about using Docker Desktop with WSL 2, visit:
https://docs.docker.com/go/wsl2/
此错误出现的原因主要是因为所在的系统的WSL版本对比于Docker Desktop的WSL版本过低导致。
1.在powerShell中查看wsl版本。
wsl --list --running
2.转换低系统wsl到2。
wsl --set-version xxx 2