I guess this file path for the Docker file doesn’t exist on disk. Why are trying to use a dynamic workspace in this scenario? Is this an automation machine?
Could you share with us the error you get if using absolute paths? (you have already indicated that they fail, but it would be nice to see what Docker spits out).
Could you also try launching Docker with a file that does not exit to see the error message? (please do not do this test in the dynamic workspace, but in any other directory).
We are running a test and I’m not able to find any file when using this command. I’m not a Docker expert, but could you try using the following parameters?
docker build -t docker-tag . -f .\dockerfile.txt
ERROR: failed to solve: failed to read dockerfile: open dockerfile.txt: no such file or directory
We have been debugging this error in detail. The Docker error is referencing a “\Device.…” path.
This is the path in the NT tree PlasticFS is using:
eg: \Device\Volume{41d6fc22-8224-11ef-937b-147dda9d4d35}\
The problem is Docker does not support junctions pointing to NT paths. This only affects the PlasticFS workspace mount point where that type of junction is used.
WORKAROUND: Use a letter as a mount point for the PlasticFS workspace (eg:Z:). Please let us know if it helps.
It does because if you create a dynamic workspace, it creates a junction pointing to an NT path. This only affects the PlasticFS workspace mount point where that junction type is used. Docker doesn’t support junctions pointing to NT paths.
You can use the following command: cm wk mk <wk_name> Z: --dynamic --tree=br:/main@<repo>
Let me expand on this. Drives can be “mounted” into the directory tree as a junction on Windows.
For instance, you can mount your “D: drive” using a directory, like “C:\Users<User>\MyDrive”. This is achieved by using a specific type of junction.
PlasticFS drives are no different, so whenever you specify the workspace directory on creation, that directory will be created as a junction whenever the workspace is mounted (and removed, whenever you unmount it or stop PlasticFS). This is not done by PlasticFS directly, so we have no real control over it.
This junction redirects to the real location of the PlasticFS drive, but it seems that Docker does not properly support this specific kind of junction.
Hence, using a drive letter directly should avoid this specific issue altogether, and we can check if something else prevents it from reading the dockerfile.