r/docker•
jjlolo

Migration from Linux to Win11: Docker network volumes appearing empty (WSL2/SMB)

The Situation: I am migrating a containerized stack from an Alpine Linux VM on ESXi to a native Windows 11 host (Intel N150) using Docker Desktop with the WSL2 backend.

The Setup:

  • Storage: Synology NAS share mapped to P: on the Windows host.
  • Access: I can browse and edit files on P:\Data\Files perfectly from Windows PowerShell/Explorer.

The Problem: On Linux, my bind mounts to the NAS worked perfectly. On Windows, while the host sees the files, the mapped container directories (e.g., /data) are completely empty inside the container console. The directory exists, but ls -la shows a total of 0.

What I’ve Tried:

  • Standard Bind Mounts: Used - P:/Data/Files:/data (case-matched). Result: Folder is empty inside the container.
  • UNC Paths: Tried //SERVER_NAME/share/Data/Files. Result: Error "bind source path does not exist."
  • Long-form Mount Syntax: Tried type: bind with source/target syntax. Result: Error "not a valid Windows path."
  • Permissions/Auth: Added NAS credentials to Windows Credential Manager (System level) and restarted Docker Desktop. No change.
  • Direct CLI Test: Ran docker run --mount manually to bypass the UI/Compose. Result: Still empty.

The "Double-Hop" Wall: I’ve been digging into the way WSL2 handles host mounts. It seems that even if the Windows User (me) has authenticated the P: drive, the WSL2 utility VM running the Docker Engine doesn't inherit those credentials. When I try to force a CIFS Named Volume in the YAML to bypass the host's mount, I immediately hit Error 500 or indefinite hangs.

The Question: How do I bridge this credential gap without the "double-hop" latency or 500 errors? Is there a way to make the WSL2 backend "see" the authenticated Windows network drives?

Thanks in advance.

Posted Mar 8, 2026, 8:13 PM UTC

05
Loading comments…