File I/O issues with Docker bind mounts

I’m using Docker for Windows to contain Microsoft build tools. I created a windows image (based on servercode and .net 4.7.1) and install the build tools using vs_buildtools.exe installer. I run the container to map in the USERPROFILE (which has nuget packages) and the application source code and build the VS solutions using msbuild. For all my C# .Net applications this code builds fine. I’ve not seen any problems with this configuration and msbuild, csc, and other associated build tools works. But now I’m trying C++ native code apps and I’m hitting errors.

Error message says fatal error C1041: cannot open program database 'C:\AgentWork\32\i\obj\calcmanager.vcxproj_1174148162\Release\x64\CalcManager.pdb

If I xcopy the source code to a folder inside the container the build succeeds.

I’m certain (nearly) that nothing else has the pdb file open, unless it’s the docker daemon and volume manager itself.

Has anyone experienced file I/o issues with processes running in the container accessing files though mounted volumes.

I’m using -v to map a local folder to a volume in the container and I read that it’s preferred to use --mount. Would that make a difference?

2 Likes

I’ve got same trouble. Is there any solution?

Also seeing this issue

I am seeing the same problem. Can anyone help???

I solved the problem for me with this one https://molecular-matters.com/docs/livepp/faq.html

Switching to Z7 helped me.

I’m having this problem too whilst using Vcpkg on a mounted volume. Any solutions?

I have the same problem,
error C2471: cannot update program database ‘C:…\vc141.idb’.
If i copied all the project inside the container, not using the shared volume. Everything works.
I’m using Docker Version: 20.10.2

I’m having the same issue, both vcpkg and msbuild have issues.

There’s a related GitHub ticket but it has been closed and frozen. Therefore I’ve created a new one.