I have installed Docker Desktop for Windows in Windows 10 operating system. I am running a python script inside docker container which reads file from disk and add few text at the end of files. Now the requirement is to read files from Windows 10 and perform the same operation on it.
Is it possible in docker to read files from OS on top of which Docker is running?
Of course, you can use volumes.
For example, you can run the following command:
docker run -v path/to/your/file/on/host:path/to/the/file/on/container your_image
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With