I'm trying to get started with Docker, but I'm finding it pretty frustrating so far. I have two external drives that I want to use with one of my Docker containers, but I'm having a tough time getting them to show up. I'm running Docker on Windows 11 and after searching online, I haven't found any clear solutions. Has anyone figured out how to enable access to external hard drives in Docker? Any help would be appreciated!
3 Answers
If you're running Docker Desktop, you need to explicitly select the drives you want Docker to have access to in the Docker settings. After that, you can use WSL to run commands that bind those external drives. For example, you can use this command to mount your drive: `docker run -it --rm -v "/mnt/d:/mnt/d" ubuntu ls`. Just replace 'D' with your external drive letter!
You should check out Docker volumes! They allow containers to reach certain parts of the filesystem. Just make sure that your Docker app has access to the drives you want to use. If you're using Docker Desktop on Windows, you can enable this in the settings. Once that's sorted, it's all about using the regular Docker volume commands. Just a tip though: for launching containers, I recommend using `docker run` or Docker Compose instead of the UI for better control.
I went into the settings to grant access, but my drives still aren’t appearing. Any other suggestions?
One option you have is to utilize bind mounts. However, keep in mind that on Windows, you can't use the 'mount' command in the same way that you would in Linux. Instead, make sure your drives are listed as shared in Docker’s settings. Once they are listed, you can run your container with the appropriate volume parameters to map them correctly in the command line.
I tried to set them up in the settings, but it still isn't working.

Thanks for this tip! I tried it, but it’s still not showing up in the mount folder.