Open ericksc opened 4 years ago
@ericksc thanks for your report. Could you describe what you're doing in a bit more detail?
Are you mounting a share to the Windows host, for example as D:
and then running docker run -it -v D:\my-project/my-project alpine sh
?
@djs55 my plan is to mount enterprise share locations like \my_company.com\my_dir\ is it currently under the support by docker mount Samba SMB network location?
I was also unable to mount shared folder with the following setup:
Here's what I tried:
mydir
with the VM in VMware
Z:\mydir
on the guest/Windows side which points to \\vmware-host\Shared Folders\mydir
mydir/nestedir
(a nested folder inside the mounted one)mydir/onefile
(an empty file inside the mounted dir)PS C:\> docker run -v 'Z:\mydir:/data' -ti alpine:latest /bin/sh
/ # ls -la /data
total 8
drwxr-xr-x 2 root root 4096 Jun 21 17:47 .
drwxr-xr-x 1 root root 4096 Jun 21 17:48 ..
/ #
^ nesteddir
nor onefile
is visible from inside the container
I think the most confusing thing is that one may not even realize that it doesn't work as there's no error message or any other hint to suggest that, it just seems to mount an empty folder.
Here is the output from docker inspect
: https://gist.github.com/radeksimko/5e3c631b7b87f34d870c067d6c6353c8
Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
comment.
Stale issues will be closed after an additional 30 days of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale
Same here +1
/lifecycle frozen
/remove-lifecycle stale
Same here - Microsoft claims this is possible but I can't get it to work.... https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/persistent-storage
Same issue here. Got the following errors: docker run -t -v z:/mnt/z anycontainer:latest docker: Error response from daemon: OCI runtime create failed: invalid mount {Destination:z:/mnt/z Type:bind Source:/var/lib/docker/volumes/aea40b4ac6cc6458d6857d76612a365288aa33b354bab974beef6b4e962663ba/_data Options:[rbind]}: mount destination z:/mnt/z not absolute: unknown.
And when trying to add the network drive in the Settings of Docker the following message pops up:
Error invoking remote method 'desktop-backend': Error: {"error":true,"type":0,"reason":"Path must be absolute.","details":"System.ArgumentException: Path must be absolute.\r\n at Docker.Core.CanonicalizePath.Ensure(String path) in C:\workspaces\PR-16070\src\github.com\docker\pinata\win\src\Docker.Core\CanonicalizePath.cs:line 34\r\n at Docker.ApiServices.Services.SettingsServices.FileSharingRepository.<>c__DisplayClass7_0.1.ForEach(Action
1 action)\r\n at Docker.ApiServices.Services.SettingsServices.FileSharingRepository.
Resources File sharing These directories (and their subdirectories) can be bind mounted into Docker containers. You can check the documentation for more details.
C:\tmp
same issue - Docker version 20.10.13, build a224086
Same case.
Docker v20.10.14
docker run -v \\wsl$\docker-desktop-data\version-pack-data\community\docker\volumes:/volumes --rm -it alpine sh
docker: Error response from daemon: can't access specified distro mount service: stat /run/guest-services/distro-services/docker-desktop-data.sock: no such file or directory.
the same here, performing:
docker run --entrypoint "/bin/bash" --workdir="/test" --volume="f:/testfolder:/test/data" -it testvolume
on Windows 10, Docker 20.10.17
and /test/data is empty after login into container. F: drive is network attached and seen in the windows explorer.
The same result with a symlink to network location:
mklink /d "c:\temp\test" "//nethdd/workfolder"
and then adding an option
docker run --entrypoint "/bin/bash" --workdir="/test" --volume="c:\temp\test\testfolder:/test/data" -it testvolume
it gives nothing again, it seems docker is not able follow the host machine network symlinks from inside the container :(
same here, kind of annoying when this behavior does not happen on my linux nodes.
Expected behavior
Mount Network Share path as a volume to use under docker container under Windows 10 as Host
Actual behavior
No able to have access the network path resource on Docker settings then no possible to mount it
Information