Hello All,
I have below scenario
I have .net application where there is background worker process.
I have source and Destination folders path can come from Database. My application checks any files in source folder and moves it to destination folder.
It is working without Docker. Now if I create docker image of the application I have to create volumes as I read. and execute docker run command like below docker run -v "D:\\FileMonitoring\\FilePaths\\Base_Filepath1:C:\\app\\Base_Filepath1" -v "D:\\FileMonitoring\\FilePaths\\Temp_FilePath:C:\\app\\Temp_FilePath" pathfinder
But I don’t know in advance what would be path. It can be E drive as well. So I can not execute above command.
Someone suggested Symbolic link like
Create the symbolic link using mklink ( as mine is Windows container)
But again in code they suggested
but why should I add Docker code logic inside my application code. My application code should not have all these checks.
Again my destination folder will be monitored by one web api which will be in another container. So there also I need to create volumes and all.
Is there any alterative simple way to achieve this. Please share any reference link
Thanks for reply. But my query is different. I am using Window container, I can create the volumes and it works for the paths. I have paths coming from Database dynamically, so in docker run command I can not write the path as I am not aware of it in advance.
My application looks in the folder continuously to process files. This path coming from Database. What if database changes path from D drive to E drive. My application should automatically look in to that folder only without any docker run command.
Every time I can not go and run docker for new paths.
Please provide me suggestion or reference for this scenario.
Hi,
You mean 2 drives here as D and E drive? What if db has path as C drive suddenly , again we need to mount for C drive or folder structure changed form DB? Then already running application, and Db change. I don’t want to execute docker run command in between, and it should take path automatically.
Linux has / as parent to all files. Windows does not have that.
So if you want to access random files on random drives within a container on Windows without restarting it, you need to bind mount all potentially used drive letters.