Docker Community Forums

Share and learn in the Docker community.

Application gets stuck when writing to mounted drive


#1

Hi,

I am trying to mount a volume so that my c++ native application can write files in a host directory.

So I did the following :

docker run -it --name microsw2017 -v"c:\MountVol:c:\mount2" -p 4020:4020 -p 4021:4021 --rm microservercore2017 cmd

The mounting works fine, I can read file from the host without any problem.

But when I start writing the mounted directory the application gets stuck and I usually have to restart the docker engine.

I have tried Windows CopyFile function as well as standard C fopen/fwrite/fclose functions. Both get stuck :frowning:

What is more strange is that the file operation is successful (i.e. : a new file appears in the mounted host directory), though the file can only be access after I restart the docker engine.

I thought about permission but I can issue a DOS shell copy operation without any problem.

Note that if I use a directory inside the windowservercore based container the copy works without any problem.

Any idea what is the problem?

Thanks,

Mathieu