error during connect: This error may indicate that the docker daemon is not running. (http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.41/containers/json)
ID: docker/docker-daemon-not-running-wsl2
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| Docker Desktop 4.20.0 | active | — | — | — |
| Docker Desktop 4.21.1 | active | — | — | — |
| WSL2 kernel 5.15.90.1 | active | — | — | — |
| Windows 10 22H2 | active | — | — | — |
| Windows 11 23H2 | active | — | — | — |
Root Cause
Docker Desktop for Windows fails to start the daemon when WSL2 integration is misconfigured or the WSL2 kernel is outdated.
generic中文
当 WSL2 集成配置错误或 WSL2 内核过时时,适用于 Windows 的 Docker Desktop 无法启动守护进程。
Official Documentation
https://docs.docker.com/desktop/troubleshoot/topics/#wsl-2-integrationWorkarounds
-
80% success Update the WSL2 Linux kernel by running 'wsl --update' from an elevated PowerShell, then restart Docker Desktop.
Update the WSL2 Linux kernel by running 'wsl --update' from an elevated PowerShell, then restart Docker Desktop.
-
75% success Disable and re-enable WSL2 integration in Docker Desktop: Settings > Resources > WSL Integration > toggle off all distros, apply, then toggle on the desired distro and restart.
Disable and re-enable WSL2 integration in Docker Desktop: Settings > Resources > WSL Integration > toggle off all distros, apply, then toggle on the desired distro and restart.
-
70% success Manually set the WSL2 kernel path in %USERPROFILE%\.wslconfig with a 'kernel=C:\\path\\to\\kernel' entry, then run 'wsl --shutdown' and restart Docker Desktop.
Manually set the WSL2 kernel path in %USERPROFILE%\.wslconfig with a 'kernel=C:\\path\\to\\kernel' entry, then run 'wsl --shutdown' and restart Docker Desktop.
中文步骤
通过以管理员身份运行的 PowerShell 执行 'wsl --update' 更新 WSL2 Linux 内核,然后重启 Docker Desktop。
在 Docker Desktop 中禁用并重新启用 WSL2 集成:设置 > 资源 > WSL 集成 > 关闭所有发行版,应用,然后重新打开所需发行版并重启。
在 %USERPROFILE%\.wslconfig 中手动设置 WSL2 内核路径,例如 'kernel=C:\\path\\to\\kernel',然后执行 'wsl --shutdown' 并重启 Docker Desktop。
Dead Ends
Common approaches that don't work:
-
Restarting Docker Desktop from the system tray
65% fail
If the underlying WSL2 integration is broken or kernel is outdated, restarting Docker Desktop alone does not fix the issue; the daemon will fail again immediately.
-
Reinstalling Docker Desktop entirely
80% fail
The error is often caused by a stale WSL2 kernel or misconfigured .wslconfig, not by Docker Desktop installation files. Reinstalling is time-consuming and rarely resolves the root cause.
-
Running 'wsl --shutdown' and then restarting Docker
55% fail
While this can temporarily clear state, it does not update the WSL2 kernel or fix integration settings; the error returns after the next system reboot.