WSL 2 / Docker Desktop cannot see ANY files on Windows C: drive after exhaustive troubleshooting

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 shows total 0 (i.e., the directory appears empty).
  • Crucially, when I go directly into the docker-desktop WSL 2 shell (wsl -d docker-desktop) and run ls -l /mnt/c/data/media/movies, it also shows total 0 or, if I try to list specific content like ls -l "/mnt/c/data/media/movies/The Man (2005)", it says No such file or directory.
  • To rule out issues with specific paths, I created a simple folder C:\WSL_TEST\SUB_FOLDER directly on my C: drive, confirmed its existence in Windows File Explorer, but ls -l /mnt/c/WSL_TEST from within the docker-desktop WSL 2 shell still returns No such file or directory.

Repro Steps

  1. 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 subfolder C:\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 testing total 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
  1. 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.
  1. Exhaustive Troubleshooting Already Performed (No change in behaviour after each step):
  • Verified docker-compose.yml bind mount syntax.
  • Applied chmod -R 777 and chown -R 1000:1000 to C:\data (via /mnt/c/data) from within WSL 2.
  • Performed docker compose down then docker 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).
  • 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 and wsl --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.

  1. When running ls -l /mnt/c/WSL_TEST or ls -l /mnt/c/data/media/movies from within the docker-desktop WSL 2 shell, I expect to see the actual contents of those folders as they appear in Windows File Explorer (e.g., listing SUB_FOLDER inside WSL_TEST, or my movie files/folders inside movies).
  2. The docker compose up -d command should start the test_app container successfully.
  3. docker exec test_app ls -l /data/movies should list the contents of the C:\data/media/movies folder as seen from the container’s perspective.

Actual Behavior

What happened instead?

  1. From the docker-desktop WSL 2 shell:
  • ls -l /mnt/c/WSL_TEST consistently returns ls: /mnt/c/WSL_TEST: No such file or directory.
  • ls -l /mnt/c/data/media/movies consistently returns total 0 (if the directory is empty) or ls: /mnt/c/data/media/movies: No such file or directory (if trying to list specific known contents).
  1. Windows File Explorer unequivocally shows that C:\WSL_TEST, C:\WSL_TEST\SUB_FOLDER, and C:\data\media\movies (with its contents) all exist and are accessible from Windows.
  2. 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.

Looks like you have a general problem with WSL2.

You should see your directories and files in a WSL2 distribution in the subfolder(s) of /mnt/c/ (replace c with whatever your Windows drive letter for the drive is). If those are not shared, you need to sort out why. Docker Desktop depends on a functioning WSL2 installation. If it’s not working properly, then there is not much Docker Desktop can do to work around that issue.

I am using Windows 11 Enterprise with the same Docker Desktop and WSL version, I can’t confirm that it’s a general problem:

PS D:\> mkdir "wsl-test"

    Directory: D:\

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----          03.06.2025    23:33                wsl-test

PS D:\> date > wsl-test\date.txt
PS D:\> docker run --rm -v d:\wsl-test:/test alpine cat /test/date.txt
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
fe07684b16b8: Pull complete
Digest: sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be023728e11715
Status: Downloaded newer image for alpine:latest

Dienstag, 3. Juni 2025 23:33:23