On Windows, you can try:
- Create a local user named “dockeruser” (or anything else)
- Add this user to a group with sufficient rights on the drive to be shared (for instance, administrators)
- Use the docker “Manage shared drives” option and
** If you have any credentials there, reset them first and un-share the previously shared drives
** Re-share your drive(s) –
** When prompted for the credentials, use
10.0.75.1\dockeruser
- Run the container using
docker run -it -v C:/:/data alpine sh
- Inside the container, verify if the host files are acessible under /data using
cd /data
ls
How to debug:
- Inside the container, use the command “mount” and verify that you have a line such as:
//10.0.75.1/C on /app type cifs (rw,relatime,vers=1.0,cache=strict,username=dockeruser,domain=10.0.75.1,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.75.1,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,noperm,rsize=61440,wsize=65536,actimeo=1)
- On the Windows host, right click on the drive being shared and double check if the user “dockeruser” has full access on the share, by using “Sharing tab/Advanced Sharing/Permissions”
- On the Windows host, double check if the user “dockeruser” has permissions to access the files on the shared drive (for instance, login as that user, or use “runas /user:dockeruser explorer.exe” and try to browse the drive)
- For more information, read the blog post http://docker-saigon.github.io/post/Docker-Beta/
This solution is working on
Windows 10.0.10586 Build 10586
Docker version 1.11.1, build 5604cbe