I'm using Docker for windows and I want to find where the volumes are created by Docker, in a Linux container?
Has anyone been able to perform the volume mounting that I am trying to achieve?
In order to share Windows folders with Docker containers, you first need to configure the "Shared Drives" option in Docker settings. Once the Shared Drives option is configured, you can mount any folder on shared drives with the "-v" (volume) flag.
You can run both Linux and Windows programs and executables in Docker containers. The Docker platform runs natively on Linux (on x86-64, ARM and many other CPU architectures) and on Windows (x86-64). Docker Inc. builds products that let you build and run containers on Linux, Windows and macOS.
You can run any application in Docker as long as it can be installed and executed unattended, and the base operating system supports the app. Windows Server Core runs in Docker which means you can run pretty much any server or console application in Docker.
If you're just trying to mount a windows path to a Linux based container, here's an example using the basic docker run
command:
docker run -d --name qbittorrent -v "/f/Fetched Media/Unsorted":/downloads -v "/f/Fetched Media/Blackhole":/blackhole linuxserver/qbittorrent
This example shares the f:\Fetched Media\Unsorted
and f:\Fetched Media\Blackhole
folders on the Windows host to the container, and within the Linux container you'd see the files from those Windows folders in the respective Linux paths shown to the right of the colon(s).
i.e. the f:\Fetched Media\Unsorted
folder will be in the /downloads
folder in the Linux container.
*First though, make sure you've shared those Windows folders within the Docker Desktop settings area in the GUI.
Update for WSL(2): You don't need to specifically share the Windows folder paths; that's only needed when not using WSL.
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