我想在windows容器中挂载文件共享。我尝试挂载Azure文件存储共享,最初它工作得很好。我可以浏览目录中的文件。
然而,当我断开并重新连接我的容器powershell-session时,共享被标记为“不可用”。此外,共享对于作为我的入口点运行的可执行文件不可用。
docker exec -it a4 powershell
**************
PS C:\> net use z: \\XXXX.file.core.windows.net\dockerstore /u:XXXXX XXXXXX== /P:Yes
The command completed successfully.
PS C:\> net use
New connections will be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
OK Z: \\XXXX.file.core.windows.net\dockerstore
Microsoft Windows Network
The command completed successfully.
exit
******************
docker exec -it a4 powershell
**********************
PS C:\> net use
New connections will be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
Unavailable Z: \\XXXX.file.core.windows.net\dockerstore
Microsoft Windows Network
The command completed successfully.我还尝试在主机上挂载网络驱动器,并将其挂载到容器中。但是docker-compose无法打开它(访问问题?):
Cannot create container for service configserver-c: invalid bind mount spec "z:\\Certificates:c:\\Certificates:rw": invalid volume specification: 'z:\Certificates:c:\Certificates:rw': invalid mount config for type "bind": bind source path does not exist是否有其他选项可永久装载外部文件共享?(我不知道有任何适用于windows的Docker卷驱动程序。)
更多信息:我在带有Hyper-V隔离的Windows 10上使用Docker for Windows。
Docker版本:
Client:
Version: 17.03.1-ce
API version: 1.27
Go version: go1.7.5
Git commit: c6d412e
Built: Tue Mar 28 00:40:02 2017
OS/Arch: windows/amd64
Server:
Version: 17.03.1-ce
API version: 1.27 (minimum version 1.24)
Go version: go1.7.5
Git commit: c6d412e
Built: Tue Mar 28 00:40:02 2017
OS/Arch: windows/amd64
Experimental: truehttps://stackoverflow.com/questions/44431949
复制相似问题