简体   繁体   English

Docker 无法在 Windows 上初始化 10

[英]Docker Failed to Initialize on Windows 10

I have an issue with running the Docker Desktop on my Windows 10 PC.我在 Windows 10 PC 上运行 Docker 桌面时遇到问题。 After trying to run it I got an error:尝试运行后出现错误:

Docker failed to initialize - Docker Desktop is shutting down Docker 初始化失败 - Docker 桌面正在关闭

I already tried reinstalling (as admin), restarting PC, restarting docker services, removing content from.../AppData/Local/Docker and.../AppData/Roaming/Docker folders, but still receiving the same error message.我已经尝试重新安装(以管理员身份),重新启动 PC,重新启动 docker 服务,从.../AppData/Local/Docker 和.../AppData/Roaming/Docker 文件夹中删除内容,但仍然收到相同的错误消息。

Does anyone have an idea how can I fix it?有谁知道我该如何解决?

Thank you a lot!十分感谢!

Downgrade to the older version solved my issue降级到旧版本解决了我的问题

I get that a lot on my laptop.我在笔记本电脑上得到了很多。 I restart the "Hyper-V Host Compute Service" in Services.我在服务中重新启动“Hyper-V 主机计算服务”。 When that has restarted, I can start Docker Desktop.重新启动后,我可以启动 Docker Desktop。

I haven't found a permanent fix.我还没有找到永久修复。

You can try uninstalling docker and deleting您可以尝试卸载 docker 并删除

  1. /Users/AppData/Local/Docker /用户/AppData/本地/Docker
  2. /Users/AppData/Roaming/Docker /用户/AppData/漫游/Docker
  3. C:/Program Files/Docker C:/程序文件/Docker
  4. C:/ProgramData/Docker C:/ProgramData/Docker
  5. Reinstalling Docker重新安装 Docker

However, what worked for me ultimately was deleting.docker in /Users folder and restarting docker.但是,最终对我有用的是删除 /Users 文件夹中的 docker 并重新启动 docker。

I had the same issue while starting the "Linux container" but windows container was working fine.我在启动“Linux 容器”时遇到了同样的问题,但 windows 容器工作正常。

After trying All the possible methods to make docker desktop work, In case that is not worked then try this one.在尝试了所有可能的方法后,使 docker 桌面工作,如果没有工作,那么试试这个。 This one worked for me.这个对我有用。

Please make sure to use older version of docker desktop ( mine is 4.4)请确保使用旧版本的 docker 桌面(我的是 4.4)

In docker desktop,在 docker 桌面,

  1. Go to settings --> General --> Use the WSL 2 based engine Where If that check box turned On, Just Turn that off . Go 到设置 --> 常规 --> 使用基于 WSL 2 的引擎 如果该复选框打开,只需将其关闭

Simply local Appdata on your windows box, go to Roaming->Docker and delete the settings.json file.只需将 windows 框、go 上的本地 Appdata 到 Roaming->Docker 并删除 settings.json 文件。 Restart docker and you will be fine.重启 docker 就可以了。 Appdata can be located at this path: C:\Users\LifeIsGood\AppData\Roaming\Docker Appdata 可以位于此路径:C:\Users\LifeIsGood\AppData\Roaming\Docker

NB.注意。 LifeisGood is my username LifeisGood 是我的用户名

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM