【问题标题】:Docker for Windows: Drive sharing failed for an unknown reasonDocker for Windows:驱动器共享因未知原因而失败
【发布时间】:2020-01-01 18:23:02
【问题描述】:

环境:

`Windows 10 企业版1809 17763.864

Docker 桌面社区2.1.0.5

尝试从 D 盘共享驱动器

docker run -it -v d:/srv/busybox/demo:/var/log busybox

守护进程抛出错误为Drive sharing failed for an unknown reason

检查 docker 日志时

[17:07:54.721][Moby              ][Info   ] [  866.663149] CIFS VFS: SMB3 encryption not supported yet
[17:07:54.757][Moby              ][Info   ] [  866.698107] CIFS VFS: SMB3 encryption not supported yet
[17:07:54.797][Moby              ][Info   ] [  866.729911] CIFS VFS: SMB signature verification returned error = -13
[17:07:54.835][Moby              ][Info   ] [  866.770682] CIFS VFS: SMB signature verification returned error = -13
[17:07:54.841][SambaShare        ][Error  ] Unable to mount D drive: unexpected error: System.AggregateException: One or more errors occurred. ---> Docker.Backend.HttpBadResponseException: Exception of type 'Docker.Backend.HttpBadResponseException' was thrown.
   at Docker.Backend.HttpClientExtensions.<ParseResponseBodyAsJsonAsync>d__2`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 Docker.Backend.HttpClientExtensions.<PostJsonWithJsonResponseAsync>d__1`1.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Docker.Backend.LifecycleClient.Mount(MountRequest req)
   at Docker.Backend.SambaShare.MountInMoby(String drive, Credential cred, UserNameAndDomain info, String options, String ip)
---> (Inner Exception #0) Docker.Backend.HttpBadResponseException: Exception of type 'Docker.Backend.HttpBadResponseException' was thrown.
   at Docker.Backend.HttpClientExtensions.<ParseResponseBodyAsJsonAsync>d__2`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 Docker.Backend.HttpClientExtensions.<PostJsonWithJsonResponseAsync>d__1`1.MoveNext()<---

来自尝试过的社区的建议

  1. 创建具有 RWX 权限的本地用户来驱动
  2. 共享驱动器
  3. 重启电脑:-P
  4. 为 Windows 重置 docker
  5. 在 Windows 和 Linux 容器之间切换
  6. 为 windows 重新安装 Docker
  7. 禁用防火墙/防病毒软件

但没有任何帮助!

【问题讨论】:

    标签: docker docker-for-windows


    【解决方案1】:

    罪魁祸首是 SAMBA 加密。禁用加密后效果很好

    Bug:无法共享 C 盘 #1637 https://github.com/docker/for-win/issues/1637

    Bug:加密禁用不是一个选项,也不是 SMB 低于 3 #5342 https://github.com/docker/for-win/issues/5342

    但不建议这样做,因此在当前 Docker for windows 的边缘版本中已远离 SAMBA。

    因此安装 Docker for Windows Edge 2.1.7.0(41536) 或更高版本解决了该问题。

    您可能会面临从稳定的 2.1.0.5(当前)切换到边缘通道

    Bug:Windows 上的 Docker Desktop 无法切换到 Edge #4672 https://github.com/docker/for-win/issues/4672(打开)

    您可以从https://docs.docker.com/docker-for-windows/edge-release-notes/卸载稳定版本并下载边缘版本

    对我来说,安装 Docker for Windows Edge 2.1.7.0(41536) 解决了这个问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-21
      • 1970-01-01
      • 2021-09-01
      • 1970-01-01
      • 2017-10-27
      相关资源
      最近更新 更多