错误:无法连接到Docker守护程序+ WSL2

时间:2020-07-22 11:00:08

标签: windows docker wsl-2

我有时在WSL2安装(Windows 2004)上遇到Docker问题:

$ docker info
Client:
 Debug Mode: false

Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. 
Is the docker daemon running?
errors pretty printing info

当然我还没有设置DOCKER_HOST

但是Docker守护程序正在Windows上运行:

$ tasklist.exe | grep docker
com.docker.service            7016 Services                   0     46'884 K
com.docker.backend.exe        9904 Console                    1     18'456 K
docker-mutagen.exe           15108 Console                    1      8'448 K
com.docker.proxy.exe         21368 Console                    1     17'960 K

我的Ubuntu发行版正在运行WSL:

$ wsl.exe -l -v
  NAME                   STATE           VERSION
* Ubuntu-20.04           Running         2
  docker-desktop         Running         2
  docker-desktop-data    Running         2

$ docker --version
Docker version 19.03.8, build afacb8b7f0

enter image description here

奇怪的是,Docker说我没有任何WSL 2发行版:

enter image description here

0 个答案:

没有答案