Docker for windows mapped network drive cant get it to work

Hi All

Hoping that someone can help - I have 3 strands of hair left …

When creating a container I specify the location ion the host followed by the mapped directory in the container,

It works when I specify a local drive like “C” drive. i.e. -v C:\<Dir>\<media>:/media

But my files are on the mapped network drive and configuring it as above does not work and the mapped folder in the container is blank/empty…

i.e. -v “\\NAS\<Dir>\<Media>:/media2”

I tried both Samba and NFS - same behaviour.

Surely there must be a way to do it as im an certain im not the only person in the world trying to access a network resource from a docker container on Windows.

The same container works perfect in Linux Docker, as you pre-mount a share to a directory, which is in no way the same as a symbolic link in windows.

Looking forward to your reply

Hi,

The “Docker 4 Windows” file sharing functionality is based on the CIFS protocol which basically is a samba share …

I tried both Samba and NFS - same behaviour.

Since you tried Samba already, imo you should go that route and directly connect your containers that way, without the windows file sharing mechanism, in between.

IMO there are 2 projects, which you can “steal” from:

It’s probably not exactly what you need, but enought to get it going. … and save the rest of your hair :slight_smile: