We have old Windows Server 2022 servers, where Docker Engine service run from Local system account, servers have smb share mapped to M: and we could map this share into containers, using forward and backslashes:
$ docker run --rm -v M:/.c:C:/.c mcr.microsoft.com/windows/server:ltsc2022 cmd /c dir C:\.c
<dir output>
$ docker run --rm -v M:\.c:C:\.c mcr.microsoft.com/windows/server:ltsc2022 cmd /c dir C:\.c
<dir output>
But I cannot do the same on Server 2025, when Docker Engine service run from Local system account (neither 2022 nor 2025 based images are working):
$ docker run --rm -v M:/.c:C:/.c mcr.microsoft.com/windows/server:ltsc2022 cmd /c dir C:\.c
docker: Error response from daemon: invalid volume specification: 'M:/.c:C:/.c': invalid mount config for type "bind": bind source path does not exist: m:\.c
$ docker run --rm -v M:/.c:C:/.c mcr.microsoft.com/windows/server:ltsc2025 cmd /c dir C:\.c
docker: Error response from daemon: invalid volume specification: 'M:/.c:C:/.c': invalid mount config for type "bind": bind source path does not exist: m:\.c
When I stop docker service and run dockerd manually, so it definitely would have access to M:, error is changing
$ docker run --rm -v M:/.c:C:/.c mcr.microsoft.com/windows/server:ltsc2025 cmd /c dir C:\.c
docker: Error response from daemon: hcs::CreateComputeSystem 6b7bed1c8264b9c4393af80b67f5d04f207644c3e3d9bdfbb3f909cc8b724087: The system cannot find the path specified.
If I start container mapping only local disks into it, I can map network share inside of container, bit it would not be trivial to adapt that approach in all places currently using old system.
Is there a way map smb share into docker container on Server 2025? Question about pure windows containers in process isolation mode, no linux containers, docker desktop, WSL or Hyper-V involved here.