docker for windows,无法共享驱动器

时间:2018-04-12 04:32:33

标签: windows docker

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

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

似乎要分享,然后驱动器复选框取消检查。

日志包含以下内容:

[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>

3 个答案:

答案 0 :(得分:0)

目前紧随其后的是docker/for-win issue 1286

  

我有一个类似的问题,Docker for Windows不知何时失去了将主机卷安装到容器中的能力。
  这种情况发生在Windows 10和Windows Server 2016上,最近一次发生在Server 2016上,版本为17.09.0-ce-win33。

     

对我有用的解决方法是重启Docker守护程序,尽管很少需要重启系统。

答案 1 :(得分:0)

在您的日志文件中突出的一件事是:

[21:13:12.998] [SambaShare] [错误]无法验证信用证:用户名或密码无效

密码中是否有任何特殊字符(除了a-Z 0-9)? (尝试选择没有特殊字符的密码)

否则,请尝试点击&#34;重置凭据&#34;然后再试一次,确保密码没有过期。

答案 2 :(得分:0)

对于我来说,我是使用Microsoft帐户登录的。似乎Docker不喜欢那样。我必须重新配置用户以使用本地帐户登录,然后一切正常。

您可以通过:

  • 打开Windows菜单
  • 输入“您的信息”
  • 点击“使用本地帐户登录”链接
  • 设置密码
  • 退出
  • 登录
  • 在Docker中执行共享驱动器

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