I want to mount a file share in a windows container. I have tried to mount an Azure File storage share, and intially it works fine. I can browse the files in the directory.
However, when I disconnect and reconnect my container powershell-session, the share is marked 'Unavailable'. Also, the share is not available to the executable running as my ENTRYPOINT.
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.
I also tried mounting the network drive on the host, and mounting it in the container. But docker-compose fails to bring it up (access-problem?):
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
Are there other options to persistently mount an external file share? (I don't know of any Docker Volume drivers available for windows.)
Some more information: I use Docker for Windows on Windows 10 with Hyper-V isolation.
Docker version:
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: true