Docker 桌面在 Windows 容器模式下停止

Docker desktop stopped in Windows container mode

我在 Windows 10 Pro 机器上使用 Docker Desktop 最新版本 (4.7)。在我安装 docker 并在 Windows Container 模式下拉出一个容器并成功地 运行 之后,在我第一次重启之前一切正常。 但是现在每当我 运行 docker,抛出这个异常后我就会看到 Desktop Docker stopped...

System.Exception:
Paths contain symlinks
   at Docker.Core.PermissionUtils.CheckPath(String path, Boolean allowDockerAppData) in C:\workspaces\PR-17669\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 250
   at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\PR-17669\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 46
   at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\PR-17669\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 70
   at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\PR-17669\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 70
   at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\PR-17669\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 70
   at Docker.Core.PermissionUtils.ApplyACLOnChildren(ILogger logger, String path, Int32 recurse) in C:\workspaces\PR-17669\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 70
   at Docker.Backend.HttpAPI.WindowsContainersController.FixPermissions(String path) in C:\workspaces\PR-17669\src\github.com\docker\pinata\win\src\Docker.Backend\HttpAPI\WindowsContainersController.cs:line 72
   at Docker.Backend.HttpAPI.WindowsContainersController.Start(WindowsContainerStartRequest request) in C:\workspaces\PR-17669\src\github.com\docker\pinata\win\src\Docker.Backend\HttpAPI\WindowsContainersController.cs:line 35
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_1.<GetExecutor>b__0(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()

我尝试了各种解决方案,例如禁用 WSL、删除 settings.json、AppData 中的整个 docker 文件夹、运行宁 Docker 具有管理员权限,但没有任何效果。 Docker 在 Linux Container mode 中工作正常,但是当我切换到 Windows container mode 时,上述异常命中并且 docker 停止工作。

如有任何帮助,我们将不胜感激。谢谢。

这是一个已知问题 - 请参阅 https://github.com/docker/for-win/issues/12650。 您可能需要删除符号链接。