LaVOZs

The World’s Largest Online Community for Developers

'; compilation - Nmake can't locate files within a docker mount - LavOzs.Com

I have a docker container I use to compile a project, build a setup and export it out of the container. For this I mount the checked out sources (using $(Build.SourcesDirectory):C:/git/ in the volumes section of the TFS docker run task) and an output folder in 2 different folders. Now my project contains a submodule which is also correctly checked out, all the files are there. However, when my script executes nmake I get the following error:

Cannot find file: \ContainerMappedDirectories\347DEF6A-D43B-48C0-A5DF-CE228E5A10FD\src\Submodule\Submodule.pro

Where the path of the mapped container maps to C:/git/ inside the windows docker container(running on a windows host). I was able to start the docker container with an interactive powershell and mount the folder and find out the following things:

  1. All the files are there in the container.
  2. When doing docker cp project/ container:C:/test/ and running my build script it finds all the files and compiles successfully.
  3. when copying the mounted project within docker with powershell and starting the build script it also works.

So it seems nmake has trouble traversing a mounted container within docker. Any idea how to fix this? I'd rather avoid copying the project into the container because that takes quite some time as compared to simply mounting the checked out project.

Related
How to deal with persistent storage (e.g. databases) in Docker
How to port data-only volumes from one host to another?
Copying files from Docker container to host
Copying files from host to Docker container
How to mount a host directory in a Docker container
What is the (best) way to manage permissions for Docker shared volumes?
Mount SMB/CIFS share within a Docker container
Docker can't mount folder on Windows
Mount current directory as a volume in Docker on Windows 10
Docker mounted volume adds ;C to end of windows path when translating from linux style path