我有时在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
奇怪的是,Docker说我没有任何WSL 2发行版: