Hello everyone,
I’m facing a critical issue where my Docker containers (specifically Radarr, Sonarr, etc.) running via Docker Desktop on Windows cannot access files on my local C:
drive. What’s more concerning is that the underlying WSL 2 distribution itself also cannot see these files, despite Windows File Explorer confirming their existence. I’ve tried nearly every troubleshooting step imaginable, including full reinstalls, and I’m at my wit’s end.
My Setup
- Operating System: Windows 11 (OS Build 10.0.22631.5335)
- Docker Desktop Version: 4.41.2
- WSL Version: 2.5.7.0
- Kernel Version: 6.6.87.1-1
- WSLg Version: 1.0.66
- MSRDC Version: 1.2.6074
- Direct3D Version: 1.611.1-81528511
- DXCore Version: 10.0.26100.1-240331-1435.ge-release
- WSL 2 Backend: Yes, Docker Desktop is configured to use the WSL 2 engine.
The Problem
I’m using Docker Compose with bind mounts for my media stack. Example from docker-compose.yml
:
volumes:
- C:\data\media\movies:/data/movies
- When I run
docker exec radarr ls -l /data/movies
inside the container, it consistently showstotal 0
(i.e., the directory appears empty). - Crucially, when I go directly into the
docker-desktop
WSL 2 shell (wsl -d docker-desktop
) and runls -l /mnt/c/data/media/movies
, it also showstotal 0
or, if I try to list specific content likels -l "/mnt/c/data/media/movies/The Man (2005)"
, it saysNo such file or directory
. - To rule out issues with specific paths, I created a simple folder
C:\WSL_TEST\SUB_FOLDER
directly on myC:
drive, confirmed its existence in Windows File Explorer, butls -l /mnt/c/WSL_TEST
from within thedocker-desktop
WSL 2 shell still returnsNo such file or directory
.
Repro Steps
- Initial Setup (What should happen on a fresh system):
- Install Windows Subsystem for Linux (WSL 2).
- Install Docker Desktop for Windows, configured to use the WSL 2 backend.
- Create a simple directory on the Windows
C:
drive, e.g.,C:\WSL_TEST
, and place an empty subfolderC:\WSL_TEST\SUB_FOLDER
inside it. - Create another directory, e.g.,
C:\data\media\movies
, and place some files/folders inside it (or leave empty for testingtotal 0
). - Create a
docker-compose.yml
file (e.g.,C:\docker-compose\test-app\docker-compose.yml
) that includes a service with a bind mount to a Windows path, e.g.:
services:
testapp:
image: alpine/git
container_name: test_app
command: sh -c "ls -l /data/movies && tail -f /dev/null"
volumes:
- C:\data\media\movies:/data/movies
- To Reproduce the Bug (What I experience):
- After the setup, from a PowerShell window, enter the
docker-desktop
WSL 2 shell:wsl -d docker-desktop
. - Attempt to list the contents of any
C:
drive folder:ls -l /mnt/c/WSL_TEST
ls -l /mnt/c/data/media/movies
- From PowerShell, in the
docker-compose
directory:docker compose up -d
. - Then,
docker exec test_app ls -l /data/movies
.
- Exhaustive Troubleshooting Already Performed (No change in behaviour after each step):
- Verified
docker-compose.yml
bind mount syntax. - Applied
chmod -R 777
andchown -R 1000:1000
toC:\data
(via/mnt/c/data
) from within WSL 2. - Performed
docker compose down
thendocker compose up -d
. - Quit and restarted Docker Desktop application via system tray.
- Ran
wsl --terminate docker-desktop
in PowerShell, then restarted Docker Desktop. - WSL 2 Distribution Hard Reset:
- Ran
wsl --unregister docker-desktop
in PowerShell. - Quit Docker Desktop.
- Rebooted PC.
- Launched Docker Desktop (which implicitly re-created the
docker-desktop
WSL VM).
- Ran
- Full WSL 2 Platform Reinstallation:
- Quit Docker Desktop.
- Unregistered all WSL 2 distributions (
wsl --unregister docker-desktop
). - Unticked “Virtual Machine Platform” and “Windows Subsystem for Linux” in “Turn Windows features on or off”.
- Rebooted PC.
- Ran
wsl --install
in PowerShell (Admin). - Rebooted PC again (as prompted by
wsl --install
). - Ran
wsl --update
andwsl --shutdown
in PowerShell (Admin).
- Docker Desktop Clean Reinstallation:
- Uninstalled Docker Desktop via “Apps and Features”.
- Rebooted PC.
- Downloaded the latest Docker Desktop installer and performed a fresh installation.
- Confirmed: Checked Antivirus/Security Software (e.g., temporary disable, exclusions applied where possible).
- Confirmed: Ran
chkdsk C: /f /r
on the C: drive (with reboot).
Expected Behavior
What were you expecting to see? Include any relevant examples or documentation links.
- When running
ls -l /mnt/c/WSL_TEST
orls -l /mnt/c/data/media/movies
from within thedocker-desktop
WSL 2 shell, I expect to see the actual contents of those folders as they appear in Windows File Explorer (e.g., listingSUB_FOLDER
insideWSL_TEST
, or my movie files/folders insidemovies
). - The
docker compose up -d
command should start thetest_app
container successfully. docker exec test_app ls -l /data/movies
should list the contents of theC:\data/media/movies
folder as seen from the container’s perspective.
Actual Behavior
What happened instead?
- From the
docker-desktop
WSL 2 shell:
ls -l /mnt/c/WSL_TEST
consistently returnsls: /mnt/c/WSL_TEST: No such file or directory
.ls -l /mnt/c/data/media/movies
consistently returnstotal 0
(if the directory is empty) orls: /mnt/c/data/media/movies: No such file or directory
(if trying to list specific known contents).
- Windows File Explorer unequivocally shows that
C:\WSL_TEST
,C:\WSL_TEST\SUB_FOLDER
, andC:\data\media\movies
(with its contents) all exist and are accessible from Windows. - Docker containers using bind mounts to these paths (e.g.,
/data/movies
) consistently see them as empty or inaccessible, leading to applications like Radarr failing to find media.
Diagnostic Logs
As I am unable to generate these logs directly, please provide guidance on which specific logs would be most helpful given the nature of this issue (e.g., WSL 2 kernel logs, 9p
diagnostics, or specific Docker Desktop logs related to drive mounting). I am happy to collect them if instructed.