Bingo. When the firewall is switched off, everything is fine.
I could not find yet how to whitelist the adapter in Window firewall, it is not on the device list. Could anyone post a PS command line?
Share and learn in the Docker community.
Bingo. When the firewall is switched off, everything is fine.
I could not find yet how to whitelist the adapter in Window firewall, it is not on the device list. Could anyone post a PS command line?
You can whitelist the ip range (10.0.75.0 / 255.255.255.0)
Thatās what I do, but I understood your comment that it is possible to whitelist āfor the adapterā
To finalize
ā Could not get any volume sharing to work (1.12.0-rc2 meanhile, but same with earlier versions)
ā Reinstalled all several times, including manual cleanup.
ā Norton Premier is installed and takes over the firewall
ā After switching off the firewall, sharing works
ā After adding a rule to Norton Firewall to allow 10.0.75/255.255.255.0 as suggested by @donurk, everything works
@friism: I think this should be fixed in the installation procedure. My coworkers are non-technical, and I use docker to provide out-of-the box packages. Asking them to manually update firewall rules is a bit scary.
Hi,
I have tried everything in this thread, but my mounts still donāt work.
In particular I tried and ensured:
docker
user in Windows, multiple times, with various 8-char-only passwordsdocker
has access to shares in Windows sharing permissionsdocker
, photon\docker
, 10.0.75.1\docker
a@b.c
login I use for my Windows machineC:
, D:
, E:
from Mac OS via FinderIn fact, the problem has persisted and never worked since the very first release, and is still present with 1.12.0-rc2-beta16. The host is Windows 10.
A typical Docker log extract looks like this:
[14:41:43.817][SambaShare ][Info ] āDā is shared
[14:41:43.817][SambaShare ][Info ] Challenging credentials with host
[14:41:43.836][SambaShare ][Info ] Challenging credentials with host succeeded
[14:41:43.836][NamedPipeClient][Info ] Received response for IsShared
[14:41:43.836][NamedPipeServer][Info ] IsShared done.
[14:41:43.837][NamedPipeClient][Info ] Sending IsShared(E, photon\docker:)ā¦
[14:41:43.838][NamedPipeServer][Info ] IsShared(E, photon\docker:)
[14:41:43.850][Cmd ][Info ] Share name E
[14:41:43.850][Cmd ][Info ] Path E:
[14:41:43.850][Cmd ][Info ] Remark
[14:41:43.850][Cmd ][Info ] Maximum users No limit
[14:41:43.850][Cmd ][Info ] Users rb
[14:41:43.850][Cmd ][Info ] Caching Caching disabled
[14:41:43.850][Cmd ][Info ] Permission Photon\docker, FULL
[14:41:43.850][Cmd ][Info ] Photon\rb, FULL
[14:41:43.851][Cmd ][Info ]
[14:41:43.851][Cmd ][Info ] The command completed successfully.
By ādoes not workā I mean the typical behavior others described: For example in the basic Alpine, folders I try to mount via docker
are just magically created in MobiLinux, but do not reflect anything actually residing on my hard drive.
If I log into Hyper-V Manager, open the MobiLinuxVM and try
mount.cifs //photon/e /media/xxx -o user=docker
I receive an:
mount error(112): Host is down
I donāt know if thatās related or not, but clearly the host is up (e.g., reacts to ping from same VM), and I can also mount the same Samba volume from, say, OSX.
Any suggestions?
On my Windows 10 everything works Hood except that on a PC with only C: drive I canāt write in host folder.
For example: mkdir in alpine /data I got error: Canāt write, permission denied.
On other drives (D:, E:, F:) on other PCs (Win 10) everything good, I can write and read all files and folders.
Hi,
All thing I did is use normal windows credential (for ex: docker/123) and Itās work well on
Doesnt work volume sharing in C: drive
Make all writed in that topic
every firewall turned off
and i can get
volumes:
any suggestions?
I have the same issue, and Iāve confirmed the same input/output within the Moby VM itself (connected via Hyper-V on windows). When I go into a container itself (docker run alpine sh, for example) I get the same type of scenario.
Possibly unrelated
I realized that from within a Ubuntu 16.04 container, I couldnāt mount back to my host, either, using my host local IP Address. If I boot my computer into Ubuntu 16.04, the same mount command works just fine. So there was something unique to the containers/moby that was disabling this type of mount from happening.
Trying other options, I went back to using Samba as a mount type instead of cifs. I started getting the same type of errors, until I made the following change to /etc/samba/smb.conf
[global]
client max protocol = SMB2
At this point, a Samba (smb) type mount worked as desired, and my containers could mount to my host computerās shares as expected. A few packages were required from the bare Ubuntu:16.04 image to use āmount -t smbā.
Itās worth noting that CIFS completely ignores smb.conf, so it does not benefit from this fix. Reading more about CIFS because of this, Iām not even sure why docker is using it. SMB2 and SMB3 are the defaults on Windows and many other applications have moved away from CIFS.
@donurks and @dmenne Thanks so much for posting your answers. After almost giving up on Docker for Windows, I was able to solve it. The firewall was blocking access to the shared drives! Finally I can continue working on my projects.
What doesnāt work still with last beta 1.12.0-rc3-beta18 (build: 5193) on Windows is again the Shared Drive C:.
I canāt write also with āalpineā.
Example: If I launch this:
docker run -it -v %cd%:/mytest alpine sh
and then
ls /mytest
I see my folders and files. Ok. But, when I now write this:
mkdir foldertest
I got this:
mkdir: can't create directory 'foldertest': Permission denied
Iām on a folder on my Desktop.
How to fix?
If I use a D: drive everything works.
Adding the firewall rules to allow communication to/from 10.0.75.0 wasnāt doing anything - it only worked for me when I disabled it completely.
I kept thinking a bit more about this issue. And in my case, it comes down to the way the virtual adapter was being profiled by Windows (i.e Unidentified Network) - and by default windows treats Unidentified Networks as a āpublicā network, for security reasons.
So I went to Local Security Policy > Network List Manager Policies and Double-clicked āunidentified Networksā and change the location type to āprivateā. Then I restarted Docker and it worked.
I couldnāt find another way to profile the virtual adapter used by Hyper-V/docker. Another possible solution would be to turn off file/printer sharing on Guest/public networks.
Might be useful to someone else.
Now it works on my C: drive. Thanks.
Iām having the same problem here. Switched from docker toolbox to docker for windows today and mounts simply are not working. Doesnāt matter if the windows firewall is enabled or not, nor does it matter which host drive I attempt to mount. Iām wondering if docker is trying to mount from the VM instead of from the host. If I try to mount something like C:/ initially, it shows up empty. If I mount C:/Users it also shows up empty. After that, if I mount C:/ instead again, the Users directory exists (but is empty).
Sharing is enabled for C: and D: in docker, no active directory involved, windows 10 pro, docker 1.12.0-rc2-beta17 (build: 5022).
The issue from what Iāve seen in the logs is that the Docker VM (Docker for Windows using their Alpine image called Moby) mounts to your Host drive, but immediately after unmounts. In this process, the /c/ folder (and the /c/Users/ folder in your second example) are created on the VM. This means that when the mount from the Container to the Docker VM occurs, it occurs smoothly and without any issue (because /c/ does exist on the Docker VM). When you list it, itās empty.
The issue is definitely between the Host and the Docker VM.
When I went into Win 10ās Hyper-V Manager program, I can gain direct access to the Docker VM (Moby), wherein I can see that it cannot mount to the local Hostās directory at all. Manually adding a different mount driver, I was able to. CIFS was being used by default, and this did not work for me.
Hope this can help some dev probe for a solution.
FYI, just got the update to 1.12.0-rc3-beta18. No change in behavior, mounts are still not working.
I also should have added:
Docker version 1.12.0-rc3, build 91e29e8, experimental
And Iāve tried many of the āworkingā tricks, such as different Auth Credentials for the Shared Drives (adding the domain; local username; microsoft email; password changed to include no special chars; no password), and the Windows 10 shared drive settings itself (Some reported that unsharing the C: drive manually with Windows, and then resetting Docker, and sharing it within Dockerās UI helped). None of this made a difference.
Attached is the relevant logs of Docker trying to mount my drive.
docker-logs.txt (28.0 KB)
Iām suffering from the same issue. Mounting works for folders, but not files. I.e. I can see the folders present on my Win10 host in my container, but ls shows an empty directory in the container.
I get the same 3 lines in the log whenever I try to mount a volume:
[ProxyProcess ][Info ] Failed to Walk to [snapshots b5f6995d02e1583de3f69e93f2beb4b7b9eb05c0 ro com.docker.driver.amd64-linux proxy http] 9p: No such file or directory [ProxyProcess ][Info ] Failed to Walk to [snapshots b5f6995d02e1583de3f69e93f2beb4b7b9eb05c0 ro com.docker.driver.amd64-linux proxy https] 9p: No such file or directory [ProxyProcess ][Info ] Failed to Walk to [snapshots b5f6995d02e1583de3f69e93f2beb4b7b9eb05c0 ro com.docker.driver.amd64-linux proxy exclude] 9p: No such file or directory
I tried specifying the source volume as an absolute path, relative path and relative to %USERHOME%, which according the log file are all correctly translated to an absolute path in *nix notation, i.e. /c/ā¦
This is cumbersome for providing files to the container, but even worse in regards to storing data generated in the container. Those files never reach the host, the data thus is lost when the container is stopped.
I tried all of the above mentioned approaches (FW, local user, manually unsharing c:,ā¦) to no avail so far. Iām running Win10 Pro 14385 (latest insider) with DfW 1.12.0-rc3-beta18 (build:5226) ec40b14.
Ok, I think I found something that worked for me. Right clicking on the docker icon in my task bar, then settings
brings up the docker dialog. Under Shared Drives
there is a check box to allow what drives are allowed to be shared to docker. As well as an example line in a powershell terminal below it. I had to check the box. I also opted to reset the credentials at the same time. So theoretically it could have been that too. But I did both then restarted docker and mounting seems to now work.
Note, I also made sure my printing settings were setup as above that others reported. Though mine were already enabled.
@ijeweb This was the one that worked for me, finally! Thank you