我正在运行的 docker 容器似乎在我的 macbook 上运行良好,但是当在我的 Windows 10 家用电脑上运行时,Docker 引擎将会崩溃。
当我尝试使用 Docker CLI 时,它将无法连接并声称 docker 未运行,即使 docker 正在运行也是如此。
我会运行类似的东西docker ps
我会收到以下错误消息:
error during connect: This error may indicate that the docker daemon is not running.: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/ib/json: open //./pipe/docker_engine: The system cannot find the file specified.
Here https://i.stack.imgur.com/iB79F.jpg是一个屏幕截图,显示 docker 正在运行,但守护进程已关闭。
Edit:
这是 docker 守护进程日志C:\Users\admin\AppData\Local\Docker\log.txt
[07:01:09.712][VpnKit ][Info ] vpnkit.exe: Connected Ethernet interface f6:16:36:bc:f9:c6
[07:01:09.712][VpnKit ][Info ] vpnkit.exe: UDP interface connected on 172.217.165.138
[07:02:02.548][VpnKitBridge ][Info ] msg="disconnected data connection: multiplexer is offline"
[07:02:02.552][WslKeepAlive ][Info ] wsl keep-alive stopped
[07:02:02.552][WslKeepAlive ][Warning] stopped unexpectedly
[07:02:02.552][VpnKit ][Error ] vpnkit.exe: Vmnet.Server.listen: read EOF so closing connection
[07:02:02.552][VpnKit ][Info ] vpnkit.exe: Vmnet.Server.disconnect
[07:02:02.552][VpnKit ][Info ] vpnkit.exe: Vmnet.Server.listen returning Ok()
[07:02:02.552][VpnKit ][Info ] vpnkit.exe: TCP/IP stack disconnected
[07:02:02.553][GoBackendProcess ][Warning] msg="ignored error: EOF"
[07:02:02.553][GoBackendProcess ][Info ] msg="DNS: UDP server has shutdown"
[07:02:02.553][GoBackendProcess ][Warning] msg="Resyncer ports: while watching docker events: unexpected EOF"
[07:02:02.553][GoBackendProcess ][Warning] msg="Resyncer volumes/noop: while watching docker events: unexpected EOF"
[07:02:02.556][ApiProxy ][Info ] msg="error copying response body from Docker: unexpected EOF"
[07:02:02.556][ApiProxy ][Info ] msg="error closing response body from Docker: unexpected EOF"
[07:02:02.556][ApiProxy ][Info ] msg="proxy << GET /v1.41/containers/fd15363049350ab0341b468a0fb771e3933967885d8a6273ce62bdf5497ba225/logs?follow=1&stderr=1&stdout=1&tail=all (7h51m40.4693942s)\n"
[07:02:02.556][ApiProxy ][Info ] msg="error copying response body from Docker: unexpected EOF"
[07:02:02.556][ApiProxy ][Info ] msg="error closing response body from Docker: unexpected EOF"
[07:02:02.556][ApiProxy ][Info ] msg="proxy << GET /v1.41/containers/1d1c26b0fa8e36173cc7fb94e74c28db531c859c3873c74aaf7acac1c6be93b6/logs?follow=1&stderr=1&stdout=1&tail=all (7h51m31.3039328s)\n"
[07:02:02.571][VpnKitBridge ][Info ] msg="Proxy filesystem-test: context is done before proxy is established"
[07:02:02.571][VpnKitBridge ][Info ] msg="Proxy filesystem-event: context is done before proxy is established"
[07:02:02.572][GoBackendProcess ][Info ] msg="received new cli usage: {Command:logs Context:moby Status:success Source:cli}"
[07:02:02.576][LinuxWSL2Engine ][Warning] Distro stopped with exit code 1
[07:02:02.578][LinuxWSL2Engine ][Info ] Stopping windows side processes
[07:02:02.598][DockerCliAPIServer][Info ] Killing existing docker with PID 10496
[07:02:02.647][DockerCliAPIServer][Info ] Killing existing docker with PID 8856
[07:02:02.647][DockerCliAPIServer][Info ] Killing existing docker with PID 2788
[07:02:02.647][VpnKitBridge ][Error ] Process died
我假设这是 Docker 发行版本的问题,所以我卸载并安装了旧版本的 Docker Desktop 发现here https://docs.docker.com/docker-for-windows/release-notes/#docker-desktop-310.
如果我没有回来(并更新)这个答案,那么你可以假设它对我有用。
更新 1:更换为较旧的 docker 并没有解决问题。我现在相信其中一个容器内存不足。我将测试并报告回来......
更新 2:我运行了 3 个 docker 容器。我相信其中 1 个容器导致 docker 引擎崩溃。我删除后multiprocessing
从该 docker 容器中删除模块后,docker 引擎不再崩溃。有可能
3 件事中的 1 件事:
- Windows 10 家庭版不能很好地处理 Docker 化的多处理。
- 进程无法正确退出,内存占用不断增加,然后导致 Docker 引擎崩溃。
- 我是一个糟糕的程序员。
现在这个问题似乎已经解决了。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)