I haven’t tried it under Windows, but I know that under Linux it is achieved by sharing a certain directory (mounting the volume). Then, as long as I put the file in the directory of the host (that is, the real machine), the application in the container can access the files in this directory.
It is also implemented by mounting volumes. But it should be noted that there is an additional abstraction layer on Windows and Mac, that is, a virtual Linux host. According to my practice on windows, it needs to be mounted twice, once to the virtual machine and once to mount the volumes to the container.
I haven’t tried it under Windows, but I know that under Linux it is achieved by sharing a certain directory (mounting the volume). Then, as long as I put the file in the directory of the host (that is, the real machine), the application in the container can access the files in this directory.
It is also implemented by mounting volumes. But it should be noted that there is an additional abstraction layer on Windows and Mac, that is, a virtual Linux host. According to my practice on windows, it needs to be mounted twice, once to the virtual machine and once to mount the volumes to the container.
If it is win7.
Know your virtual machine name via command line
Open vbox->Select the virtual machine named default->Settings->Folder Sharing->Add shared folder->Select path (fixed allocation, automatic mounting)
When starting the container, specify -v to specify that all files that appear in the specified folder on the host will appear in the container