Windows版docker,无法共享驱动器 [英] docker for windows, cannot share drive

查看:78
本文介绍了Windows版docker,无法共享驱动器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

docker:   Version 18.04.0-ce-rc2-win61 
windows 10 enterprise

我单击docker中的设置,单击共享驱动器,选择任何驱动器C,D,Z等。

I click settings in docker, click on shared drives, select any drive C, D, Z, etc.

似乎即将共享,然后取消选中驱动器复选框。

Seems like it's about to share, then the drive check boxes un-check.

日志包含以下内容:

[21:12:39.990][SharedDrivesSettings][Info   ] Apply shared drive settings<br>
[21:12:39.992][NamedPipeClient][Info   ] Sending Version()...<br>
[21:12:39.994][NamedPipeClient][Info   ] Received response for Version<br>
[21:12:39.994][NamedPipeClient][Info   ] Sending Unmount(All, C, Docker.Core.Settings)...<br>
[21:12:39.994][NamedPipeServer][Info   ] Version()<br>
[21:12:39.994][NamedPipeServer][Info   ] Version done in 00:00:00.<br>
[21:12:39.996][NamedPipeServer][Info   ] Unmount(All, C, Docker.Core.Settings)<br>
[21:12:39.996][SambaShare     ][Info   ] Unmount C<br>
[21:12:42.185][NamedPipeClient][Info   ] Received response for Unmount<br>
[21:12:42.184][NamedPipeServer][Info   ] Unmount done in 00:00:02.1885041.<br>
[21:12:42.201][NamedPipeClient][Info   ] Sending Version()...<br>
[21:12:42.202][NamedPipeClient][Info   ] Received response for Version<br>
[21:12:42.202][NamedPipeClient][Info   ] Sending Mount(All, Z, NW\ws743e:**********, Docker.Core.Settings)...<br>
[21:12:42.202][NamedPipeServer][Info   ] Version()<br>
[21:12:42.202][NamedPipeServer][Info   ] Version done in 00:00:00.<br>
[21:12:42.204][NamedPipeServer][Info   ] Mount(All, Z, NW\ws743e1234:**********, Docker.Core.Settings)<br>
[21:12:42.543][SambaShare     ][Info   ] Mount Z<br>
[21:12:43.260][Cmd            ][Info   ] This shared resource does not exist.<br>
[21:12:43.260][Cmd            ][Info   ] More help is available by typing NET HELPMSG 2310.<br>
[21:12:43.270][SambaShare     ][Info   ] "Z" is not shared<br>
[21:12:43.270][SambaShare     ][Info   ] Creating share "Z:\" as "Z" with Full Control to "NW\ws743e1234"<br>
[21:12:44.003][Cmd            ][Info   ] Z was shared successfully.<br>
[21:12:44.613][Cmd            ][Info   ] Share name        Z<br>
[21:12:44.613][Cmd            ][Info   ] Path              Z:\<br>
[21:12:44.613][Cmd            ][Info   ] Remark            <br>
[21:12:44.613][Cmd            ][Info   ] Maximum users     No limit<br>
[21:12:44.614][Cmd            ][Info   ] Users         <br>    
[21:12:44.614][Cmd            ][Info   ] Caching           Caching disabled<br>
[21:12:44.614][Cmd            ][Info   ] Permission        NW\ws743e1234, FULL<br>
[21:12:44.614][Cmd            ][Info   ] The command completed successfully.<br>
[21:12:44.626][SambaShare     ][Info   ] "Z" is shared<br>
[21:12:44.998][SambaShare     ][Info   ] Username: ws743e1234<br>
[21:12:44.998][SambaShare     ][Info   ] Host IP: 10.0.75.1<br>
[21:12:44.998][SambaShare     ][Info   ] Cifs options: noperm,iocharset=utf8,nobrl,mfsymlinks,vers=3.02,domain=NW,sec=ntlmsspi<br>
[21:12:46.700][SambaShare     ][Error  ] Unable to mount Z drive: C:\Program Files\Docker\Docker\Resources\bin\docker.exe: error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/containers/create: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.<br>

[21:12:46.700][SambaShare     ][Info   ] Removing share Z<br>
[21:12:47.468][SambaShare     ][Info   ] Mount Z<br>
[21:12:48.078][Cmd            ][Info   ] This shared resource does not exist.<br>
[21:12:48.078][Cmd            ][Info   ] More help is available by typing NET HELPMSG 2310.<br>
[21:12:48.095][SambaShare     ][Info   ] "Z" is not shared<br>
[21:12:48.095][SambaShare     ][Info   ] Creating share "Z:\" as "Z" with Full Control to "ws743e1234"<br>
[21:12:48.777][Cmd            ][Info   ] Z was shared successfully.<br>
[21:12:49.408][Cmd            ][Info   ] Share name        Z<br>
[21:12:49.408][Cmd            ][Info   ] Path              Z:\<br>
[21:12:49.408][Cmd            ][Info   ] Remark            <br>
[21:12:49.411][Cmd            ][Info   ] Maximum users     No limit<b<br>r>
[21:12:49.411][Cmd            ][Info   ] Users             
[21:12:49.411][Cmd            ][Info   ] Caching           Caching disabled<br>
[21:12:49.411][Cmd            ][Info   ] Permission        NW\ws743e1234, FULL<br>
[21:12:49.411][Cmd            ][Info   ] The command completed successfully.<br>
[21:12:49.422][SambaShare     ][Info   ] "Z" is shared<br>
[21:12:49.428][SambaShare     ][Error  ] Unable to validate cred: Invalid username or password<br>
[21:12:49.428][SambaShare     ][Info   ] Removing share Z<br>
[21:12:49.960][NamedPipeClient][Info   ] Received response for Mount<br>
[21:12:49.960][NamedPipeServer][Info   ] Mount done in 00:00:07.7555290.<br>
[21:13:05.778][CredentialAsker][Info   ] Storing credentials: NW\ws743e1234:***********<br>
[21:13:05.829][NamedPipeClient][Info   ] Sending Version()...<br>
[21:13:05.831][NamedPipeClient][Info   ] Received response for Version<br>
[21:13:05.831][NamedPipeClient][Info   ] Sending Mount(All, Z, NW\ws743e1234:**********, Docker.Core.Settings)...<br>
[21:13:05.831][NamedPipeServer][Info   ] Version()<br>
[21:13:05.831][NamedPipeServer][Info   ] Version done in 00:00:00.<br>
[21:13:05.833][NamedPipeServer][Info   ] Mount(All, Z, NW\ws743e1234:**********, Docker.Core.Settings)<br>
[21:13:06.056][SambaShare     ][Info   ] Mount Z<br>
[21:13:06.799][Cmd            ][Info   ] This shared resource does not exist.<br>
[21:13:06.800][Cmd            ][Info   ] More help is available by typing NET HELPMSG 2310.<br>
[21:13:06.811][SambaShare     ][Info   ] "Z" is not shared<br>
[21:13:06.811][SambaShare     ][Info   ] Creating share "Z:\" as "Z" with Full Control to "NW\ws743e1234"<br>
[21:13:07.438][Cmd            ][Info   ] Z was shared successfully.<br>
[21:13:08.009][Cmd            ][Info   ] Share name        Z<br>
[21:13:08.009][Cmd            ][Info   ] Path              Z:\<br>
[21:13:08.009][Cmd            ][Info   ] Remark            <br>
[21:13:08.009][Cmd            ][Info   ] Maximum users     No limit<br>
[21:13:08.009][Cmd            ][Info   ] Users             <br>
[21:13:08.009][Cmd            ][Info   ] Caching           Caching disabled<br>
[21:13:08.010][Cmd            ][Info   ] Permission        NW\ws743e1234, FULL
[21:13:08.010][Cmd            ][Info   ] The command completed successfully.<br>
[21:13:08.023][SambaShare     ][Info   ] "Z" is shared<br>
[21:13:08.117][SambaShare     ][Info   ] Username: ws743e1234<br>
[21:13:08.117][SambaShare     ][Info   ] Host IP: 10.0.75.1<br>
[21:13:08.117][SambaShare     ][Info   ] Cifs options: noperm,iocharset=utf8,nobrl,mfsymlinks,vers=3.02,domain=NW,sec=ntlmsspi
[21:13:10.052][SambaShare     ][Error  ] Unable to mount Z drive: C:\Program Files\Docker\Docker\Resources\bin\docker.exe: error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/containers/create: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.<br>

[21:13:10.052][SambaShare     ][Info   ] Removing share Z<br><br>
[21:13:10.957][SambaShare     ][Info   ] Mount Z<br>
[21:13:11.632][Cmd            ][Info   ] This shared resource does not exist.<br>
[21:13:11.632][Cmd            ][Info   ] More help is available by typing NET HELPMSG 2310.<br>
[21:13:11.647][SambaShare     ][Info   ] "Z" is not shared<br>
[21:13:11.647][SambaShare     ][Info   ] Creating share "Z:\" as "Z" with Full Control to "ws743e1234"<br>
[21:13:12.306][Cmd            ][Info   ] Z was shared successfully.<br>
[21:13:12.978][Cmd            ][Info   ] Share name        Z<br>
[21:13:12.978][Cmd            ][Info   ] Path              Z:\<br>
[21:13:12.978][Cmd            ][Info   ] Remark            <br>
[21:13:12.978][Cmd            ][Info   ] Maximum users     No limit<br>
[21:13:12.978][Cmd            ][Info   ] Users             <br>
[21:13:12.978][Cmd            ][Info   ] Caching           Caching disabled<br>
[21:13:12.979][Cmd            ][Info   ] Permission        NW\ws743e1234, FULL<br>
[21:13:12.979][Cmd            ][Info   ] The command completed successfully.<br>
[21:13:12.992][SambaShare     ][Info   ] "Z" is shared<br>
[21:13:12.998][SambaShare     ][Error  ] Unable to validate cred: Invalid username or password<br>
[21:13:12.998][SambaShare     ][Info   ] Removing share Z<br>
[21:13:13.629][NamedPipeClient][Info   ] Received response for Mount<br>
[21:13:13.629][NamedPipeServer][Info   ] Mount done in 00:00:07.7959981.<br>
[21:13:13.656][NamedPipeClient][Info   ] Sending Version()...<br>
[21:13:13.657][NamedPipeClient][Info   ] Received response for Version<br>
[21:13:13.657][NamedPipeClient][Info   ] Sending GetDefaultVhdxPath()...<br>
[21:13:13.657][NamedPipeServer][Info   ] Version()<br>
[21:13:13.659][NamedPipeClient][Info   ] Received response for GetDefaultVhdxPath<br>
[21:13:13.657][NamedPipeServer][Info   ] Version done in 00:00:00.<br>
[21:13:13.658][NamedPipeServer][Info   ] GetDefaultVhdxPath()<br>
[21:13:13.670][NamedPipeClient][Info   ] Sending Version()...<br>
[21:13:13.734][NamedPipeClient][Info   ] Received response for Version<br>
[21:13:13.734][NamedPipeClient][Info   ] Sending TryGetVhdxSize(C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx)...<br>
[21:13:13.659][NamedPipeServer][Info   ] GetDefaultVhdxPath done in 00:00:00.0010018.<br>
[21:13:13.734][NamedPipeServer][Info   ] Version()<br>
[21:13:13.734][NamedPipeServer][Info   ] Version done in 00:00:00.<br>
[21:13:13.735][NamedPipeServer][Info   ] TryGetVhdxSize(C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx)<br>
[21:13:13.735][PowerShell     ][Info   ] Run script...<br>
[21:13:13.874][NamedPipeClient][Info   ] Received response for TryGetVhdxSize<br>
[21:13:13.873][NamedPipeServer][Info   ] TryGetVhdxSize done in 00:00:00.1379989.<br>
[21:13:13.876][NamedPipeClient][Info   ] Sending Version()...<br>
[21:13:13.877][NamedPipeClient][Info   ] Received response for Version<br>
[21:13:13.877][NamedPipeClient][Info   ] Sending TryGetVhdxSize(C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx)...<br>
[21:13:13.877][NamedPipeServer][Info   ] Version()<br>
[21:13:13.877][NamedPipeServer][Info   ] Version done in 00:00:00.<br>
[21:13:13.878][NamedPipeServer][Info   ] TryGetVhdxSize(C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx)<br>
[21:13:13.878][PowerShell     ][Info   ] Run script...<br>
[21:13:13.977][NamedPipeClient][Info   ] Received response for TryGetVhdxSize<br>
[21:13:13.977][NamedPipeServer][Info   ] TryGetVhdxSize done in 00:00:00.0984980.<br>


推荐答案

对于我来说,我是通过Microsoft登录的帐户。似乎Docker不喜欢这样。我必须重新配置用户以使用本地帐户登录,然后它才能正常工作。

In my case, I was logged in with my Microsoft Account. Seems that Docker doesn't like that. I had to reconfigure my user to login with a local account and then it worked just fine.

您可以通过以下方式进行操作:

You can do that by :


  • 打开Windows菜单

  • 键入您的信息

  • 单击使用本地帐户链接

  • 设置密码

  • 退出登录

  • 登录

  • 在Docker中执行共享驱动器

  • Open the Windows menu
  • Type "Your info"
  • Click the "Sign in with a local account" link
  • Set a password
  • Sign-out
  • Sign-in
  • Do the Shared Drive thing in Docker

还请确保您的用户位于docker-users组中控制面板,用户管理。

Also make sure your user is in the docker-users group from the Control Panel, Users management.

这篇关于Windows版docker,无法共享驱动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆